Write a total of three classes. • CompactDisk • MusicShop • MusicShopClient Class #1: CompactDisk • Instance variables o Class CompactDisk should have two instance variables: name and price of the CD. • Constructor o This constructor should accept two arguments name and price, and initialize the CompactDisk object. • Getter Methods o Define a getter method for each instance variable. • toString method o This method should return a string that represents the information of the object. Class #2: MusicShop • Instance variables Class MusicShop maintains an array of CompactDisk objects and an instance variable size that indicates the current number of compact disks (CDs) held in the shop. • Constructor Write a constructor for class MusicShop. The constructor has one argument, which is the maximum number of CDs that the shop can hold in storage. The constructor initializes the array of CompactDisk objects to hold that number. • Method for reading information about CDs Write a method for reading information about CDs. The method should keep reading information for each of the CDs until the end of input and store that information in the array of CompactDisk objects. • Method for displaying information of CDs Write a method for displaying information about all CDs in the shop. Need to use the toString method you have already created for class CompactDisk in this method. • Method for finding the number of CDs satisfying given conditions Write a method that finds the number of CDs whose prices are less than or equal to a given price passed as the argument, and then returns that value. Class #3: MusicShopClient Class MusicShopClient creates a MusicShop object, reads the information about CDs held in the shop, displays each CD’s information and prints the number of CDs whose prices are less than or equal to a given price.
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).
Must run in Windows XP. Must run/compile in Blue J environment Cannot have errors.