Question: please make the ship classes be declared in a separate header file. CSE 112 Lab #5 - Chapter 15 (page 1019 - #12) - Derived

please make the ship classes be declared in a separate header file.
CSE 112 Lab \#5 - Chapter 15 (page 1019 - \#12) - Derived Classes, and Accessors and Mutators Use the Shipclass below and derive a Cargo and Cruise ship class from the ship class IAW chapter 15 Programming Challenges \# 12 of the text. The shipclasses should be declared in a separate header file. Demonstrate the class with a program (shown below): int main() \{ // Create an array of Ship pointers, initialzed with the addresses of 3 dynamically allocated objects. Ship "ships [3]={ new Ship("Lolipop", "1960" ), new CruiseShip("Disney Magic", "1998", 2400), new CargoShip("Black Pearl", "1800", 50000) \} // Call each object's print function. for (int index =0; index
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
