Question: Create Psuedocode Question 1: Ship, Cruise Ship, and CargoShip Classes Design Shin class that has the following members A member variable for the name of

Create Psuedocode Create Psuedocode Question 1: Ship, Cruise Ship, and CargoShip Classes Design Shin

Question 1: Ship, Cruise Ship, and CargoShip Classes Design Shin class that has the following members A member variable for the name of the ship la string A member variable for the year that the ship was built a string A constructor and appropriate accessors and mutators A virtual print function that displays the ship's name and the year it was built Design a CrueShin class that is derived from the Ship class. The CriseShip cost should the following members A member variable for the maximum number of passengers an int) A constructor and appropriate accessors and mutators A print function that everrides the print function in the base class. The Cumship case's print function should figuy only the same and the maximum number of sengers Designa CargoShia class that is derived from the Ship class. The CargoShip cas should have the following members A member variable for the cargo capacity in tonnage an int) A constructor and appropriate accessors and mutators. Aprint function that overrides the print function in the base class. The CargoShip esserint function should play on the ship's name and the ship's cargo capacity Demonstrate the classes in a program that has an array of Ship pointers. The anayements should be ined with the addresses of dynamically allocated Ship Cruiseship, and CargoShip objects. The program should the step through the array calling each object's peint function

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!