Question: (a) Write a Java superclass called Item with the following features: 1. Two private member variables a. goods, data type: String b. unitperbox, data type:

 (a) Write a Java superclass called Item with the following features:

(a) Write a Java superclass called Item with the following features: 1. Two private member variables a. goods, data type: String b. unitperbox, data type: integer 2. One constructor with two parameters a. initialize the member variable goods b. initialize the member variable unitperbox 3. Two methods with the following signatures a. public String ShowGoods () Return the goods of the object. b. public int ShowUnit PerBox() Return the unitperbox of the object

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!