Question: Can someone please give the java code that fits this problem description? Information: The sub - classes and their fields are including all setters and
Can someone please give the java code that fits this problem description?
Information:
The subclasses and their fields are including all setters and getters
Yacht: number of state rooms, the size of the pool, the number of
decks and the size of the engine.
CruiseShip: number of executive room, the number of double
rooms and the number of quad rooms.
CaargoShip: two additional fields indicating
the maximum weight of cargo allowed and the amount of re
frigerated storage the ship has.
The superclass is Ship its fields are name, nation, year, length, draft, beam. With all getters
and only the setters for name and nation.
Problem description:
Create a driver class called FlotillaDriver that is
required to do specific tasks.
Open the text file called flotilla.csv and load all ship using
the appropriate subclass into an ArrayList dedicated to the
super class Ship.
Instantiate the proper sub ship object to add to the list. The initial list will only need the basic ship information
but when creating the displays when one of the buttons is
clicked, you must provide the additional information of the
individual sub ship.
Purpose: load all information from the
unique subclasses into a list of the superclass.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
