Home / Expert Answers / Computer Science / can-you-code-this-in-java-but-not-like-the-others-on-this-app-thank-you-nbsp-do-programming-challe-pa244

(Solved): can you code this in java. but not like the others on this app thank you  Do Programming challe ...



can you code this in java. but not like the others on this app thank you 

Do Programming challenge #10 at end of chapter 9
10. Ship, CruiseShip, and CargoShip Classes
Design a class with the followin
- A constructor and appropriate accessors and mutators maximum number of passengers.
Design a class that extends the class. T
Do Programming challenge #10 at end of chapter 9 10. Ship, CruiseShip, and CargoShip Classes Design a class with the following members: - A field for the name of the ship (a string) - A field for the year that the ship was built (a string) - A constructor and appropriate accessors and mutators - A method that displays the ship's name and the year it was built Design a class that extends the class. The class should have the following members: - A field for the maximum number of passengers (an - A constructor and appropriate accessors and mutators - A method that overrides the method in the base class. maximum number of passengers. Design a class that extends the class. The class should have the following members: - A field for the cargo capacity in tonnage (an - A constructor and appropriate accessors and mutators maximum number of passengers. Design a class that extends the class. The class should have the following members: - A field for the cargo capacity in tonnage (an - A constructor and appropriate accessors and mutators - A method that overrides the method in the base class. \( \begin{array}{lll}\text { The } & \text { class's } & \text { method should display only the ship's name and the }\end{array} \) Demonstrate the classes in a program that has a array. Assign various , and objects to the array elements. The program should then step through the array, calling each object's method. (See 9-25 as an example.)


We have an Answer from Expert

View Expert Answer

Expert Answer


Answer -: ArrayList list = new ArrayList(); Ship sh
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe