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) -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 Ship class below and derive a Cargo and Cruise ship class from the ship class IAW chapter 15 Programming Challenges #12 of the text. The ship classes 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

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!