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!





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












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
Get step-by-step solutions from verified subject matter experts
