Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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_2

Step: 3

blur-text-image_3

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

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions

Question

=+e. Does it entertain, inform and/or engage the reader?

Answered: 1 week ago

Question

Explain the factors influencing wage and salary administration.

Answered: 1 week ago

Question

Examine various types of executive compensation plans.

Answered: 1 week ago

Question

1. What is the meaning and definition of banks ?

Answered: 1 week ago

Question

2. What is the meaning and definition of Banking?

Answered: 1 week ago

Question

=+ Are ballots compulsory?

Answered: 1 week ago