Question: I need help with this LONG problem.It's Urgent. Can someone help me? THANKS!! Problem 2 Your friend has a music shop and needs you to

I need help with this LONG problem.It's Urgent. Can someone help me?

THANKS!!

I need help with this LONG problem.It's Urgent. Can someone help me?THANKS!! Problem 2 Your friend has a music shop and needs youto develop a software to manage it. He sells music records intwo forms, on Vinyl and on CDs. Since both have common characteristics,

Problem 2 Your friend has a music shop and needs you to develop a software to manage it. He sells music records in two forms, on Vinyl and on CDs. Since both have common characteristics, you decide to design it as follows: a MusicRecord class, from which two other classes Vinyl and CD inherit their properties. Each MusicRecord has a title and artist in the form of a String, and a duration in minutes in the form of an int. Also, each music record should have a method to calculate its price calculatePrice() that returns a double value. However, the prices of a vinyl and a CD are calculated differently, so the method will be abstract in the MusicRecord class. The method will be implemented in each subclass as follows: Vinyl price: diameter x speed x duratiton . CD price:- duration 10 Each class should contain getters and setters, and a toString() method. MusicRecord - title: String - artist: String - duration: int + MusicRecord () +MusicRecord (title:String, artist:String duration: int) +calculatePrice ):double + toString) : String //Getters and Setters Vinyl CD - rewritable: boolean diameter: int speed: int + Vinyl() +Vinyl(title:String, artist:String, duration:int, diameter:int, speed:int) CDO +CD(title:String, artist:String, duration:int, rewritable:boolean) calculatePrice(): double +toString(): String //Getters and Setters calculatePrice(): double + toString(): String //Getters and Setters MusicShop name String records: ArrayList MusicRecord> location: String +MusicShop +MusicShop(records:ArrayList

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!