i need java code for the following:
class 1: cd
class 2: store
class 3: test
Objects from class 1 will be used to represent a cd. the information to be held in the object is: cd title(string), cd artist(string), cd value(float), list of tracks(array of strings).
The class should have a constructor to enable the instance variables to be set.
In addition methods needed to:
1) return the cost of the cd.
2) return a list of the cd's tracks.
3) compare the equality of the cd with another and return true if equals otherwise false.
Class 2 should make use of a two-dimensional array which will hold up to 5 cd objects and the number of each in-stock. Its also possible to use 2 one-dimensional arrays, one for cd objects and the other for each cd stock value.
In addition to the constructor, methods will be required to:
1) Add a cd. This method will add a cd. The details of the cds and the amount of stock should be entered. if a cd with the same title and artist already exists it will increase the cd stock counter otherwise it will make a new entry. If the array is already full then the size of the array should be increased so that the new cd can be added. Check should be made to see if a cd is already in-stock before asking the user to enter the list of tracks.
2) Delete a cd. Decrements the cd stock counter for a valid cd title and artist name. If the counter is reduced to zero it removes the cd entry completely.
3) Stock value. Calculates the total value of the stock. (all cds).
class 3 is the GUI. An applet should be developed to enable the classes to be used and act as a test program. The screen can be in two sections. The first section can be used to add and delete a cd and show the value of the stock. The other section will enable searching for cd's details to take place and will output the result with a list of the tracks found. If the cd is not found a message should be output.
Since this is supposed to be kept simple, only introductory java must be used.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
## Platform
jbuilder 8 should be used.