Question: In Java please help! ----------------------------Test File-------------------------------------------------------------- DESCRIPTION You have to design an e-commerce shopping cart. These require classes Item, Electronics, Food, Dress, Cart and Main.

In Java please help!

In Java please help! ----------------------------Test File-------------------------------------------------------------- DESCRIPTION You have to design ane-commerce shopping cart. These require classes Item, Electronics, Food, Dress, Cart andMain. Another class Test (Test java) will be provided to you inBlackboard. This class will contain main0 method and help you test yourown code. You do not need to upload Test.java. TEM CLASS Your

----------------------------Test File--------------------------------------------------------------

Item class should contain: Attributes (protected) o String name-name of the Itemmo double price price of the itenm Methods (public) ovoid setName(String n)-sets the name of Item ovoid setPrice(double p) - sets the priceof Item String getName0-retrieves name double getPrice()-retrieves price comma separating the values,for example: Apple,1.00 Item(String n, double p)-constructor, sets name n & price-pString formattedoutput returns a string containing detail of the Item as "Nameprice, without the quotes, no space only Constructors o Item0-default constructor, setsname- & price 0 ELECTRONICS CLASS Your Electronics class inherits from Item.It should have following: Attributes (private) o String model o int yearMethods (public)image text in transcribedimage text in transcribed

DESCRIPTION You have to design an e-commerce shopping cart. These require classes Item, Electronics, Food, Dress, Cart and Main. Another class Test (Test java) will be provided to you in Blackboard. This class will contain main0 method and help you test your own code. You do not need to upload Test.java. TEM CLASS Your Item class should contain: Attributes (protected) o String name-name of the Itemm o double price price of the itenm Methods (public) ovoid setName(String n)- sets the name of Item ovoid setPrice(double p) - sets the price of Item String getName0-retrieves name double getPrice()-retrieves price comma separating the values, for example: Apple,1.00 Item(String n, double p)-constructor, sets name n & price-p String formattedoutput returns a string containing detail of the Item as "Name price, without the quotes, no space only Constructors o Item0-default constructor, sets name- & price 0 ELECTRONICS CLASS Your Electronics class inherits from Item. It should have following: Attributes (private) o String model o int year Methods (public)

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!