Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone please give me the psuedocode for this program? The super class is Ship . create the three sub - classes ( Yacht ,

Can someone please give me the psuedocode for this program?
The super class is Ship
. create the three
sub-classes(Yacht,CruiseShip, CargoShip) complete with all setters and getters for the new
attributes as well as the toString method that uses the supers toString method.
. create a driver class called FlotillaDriver that is
required to do specific tasks.
. For the Yacht, there are four additional fields indicating the
number of state rooms, the size of the pool, the number of
decks and the size of the engine.
For the Cruise ship, there are three additional fields indicat
ing the number of executive room, the number of double
rooms and the number of quad rooms.
For the Cargo Ship, there are two additional fields indicating
the maximum weight of cargo allowed and the amount of re
frigerated storage the ship has.
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.Only the basic ship information in the initial list,
but when creating the displays when one of the buttons is
clicked, you must provide the additional information of the
individual sub ship.
.The organization for each line of data within the file starts
with the subship code that lets you know what type of sub
ship you have. The next six fields are the ships name, year of
built, country of registration, length, draft and beam. The
data following this depends on the the type of ship represent
ed. At this point you will need to use a decision structure
based on the subship code to determine how to access the
data.
.These displays MUST be created outside of the file reading
loop. This is to give you practice iterating through a list of ob
jects, using the instanceOf operator to determine the type of
object it is.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

Students also viewed these Databases questions

Question

Which Department Century is the worst performing?

Answered: 1 week ago