Question: i am looking for java. 1. Background Warehouse tem items items:ArrayListcltem> #name:string #weight: double +Item(name:String, a. Consider the class diagram shown on the right +Warehouse()

 i am looking for java. 1. Background Warehouse tem items items:ArrayListcltem>#name:string #weight: double +Item(name:String, a. Consider the class diagram shown on the

i am looking for java.

1. Background Warehouse tem items items:ArrayListcltem> #name:string #weight: double +Item(name:String, a. Consider the class diagram shown on the right +Warehouse() which shows that a ArrayList of items and Refrigerated!tems. +1 arehouse contains an Haddltem(item:ltem) getNumltems():int getRefrigeratedltems0) weight:double) +cost():double +getName):string +getWeight() double +toString():string) ArrayList getTotalCost():double b. An Item has a name and a weight which are +getTotalCost Refrigerated) double +toString):string supplied in the constructor. The cost method returns the cost of the item which is 2 times the weight. The tostring method should return a string like this: Refrigeratedltem #temp: double +Refrigeratedltem( name:string, weight:double temp:double) +Refrigeratedltem( item:ltem, temp:double) name Crackers, cost-$4.50, weight-2.25 A Refrigeratedltem also has a temperature which is supplied in the constructor. The cost ofa Refrigerateditem is 2 times the weight plus: (100 temp)*0.1. The toString method should return a string like this: c. +cost():double +getTemp():double +toString0:string name Ice Cream, cost-$10.00, weight-1.00, temp-20.00 degrees d. A Refrigerateditem has an additional constructor that converts an Item into a Refrigerateditem. Thus, the constructor accepts an Item and a temperature and uses the name and weight of the Item to initialize this Refrigerateditem

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!