Question: Note: Please, I need BoatPlane.cpp. In one file. Earlier Answer is wrong. Please help me out. Use C++ programming language. Please do it from scratch,

Note: Please, I need BoatPlane.cpp. In one file. Earlier Answer is wrong.

Please help me out. Use C++ programming language. Please do it from scratch, I also need output too. The earlier answer has not been valid. So please make sure to explain your codes also.

Please Do not do if you are not sure. Before you post please check the question and answer one more time. Because I had bad experience earlier. thank you.

Maximum number of files: 2 Given two classes: Plane and Boat that share common methods (add,remove) of adding and removing passengers, and the following characteristics that are distinct to each object:

each has their own method to steer; Bank, Tack

each has their own medium used for travel: Air, Sea

each with their own method to accelerate: jetThrust, setSails

each with their own method to brake: wingFlap, furlSails

each has their own sense of direction:

Plane: Nose, Tail, Left, Right

Boat: Bow, Stern, Port, Starboard

Create an abstract class Vehicle that has the methods common to all classes.

Create a derived class Boat that inherits from Vehicle and has the appropriate fields and functions.

Create a derived class BoatPlane that inherits from Boat that adds the appropriate fields and overloads the appropriate functions. A BoatPlane should be able to distinguish whether it is traveling as a Plane or a Boat.

The test of your BoatPlane class should invoke the functions to accelerate, steer, brake, and stop. Each function should simply print out a label of which method is being used: for example when you have a Boat object, accelerate() should print "setSails". When you have a PlaneBoat object accelerate() should print "jetThrust"

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!