Create an abstract class vehicle that has the methods

Assignment Help C/C++ Programming
Reference no: EM132084319

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

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".

Reference no: EM132084319

Questions Cloud

Write a script that uses three variables to store : Write a script that uses three variables to store (1) the count of distinct orders made in the Orders table (2) the total amount of sales.
What is the best source for ethical business practices : What is the best source for ethical business practices: The individual employee, or the business organization itself?
What is the purpose of the social security act : What is the purpose of the Social Security Act and how does it affect the compensation of today's employee?
Write a program that has a function prototype : Write a program that has a function prototype before main and an implementation of the function after main.
Create an abstract class vehicle that has the methods : Create a derived class BoatPlane that inherits from Boat that adds the appropriate fields and overloads the appropriate functions.
What is the pvalue : Consider testing Upper H0= : H0: µ=20 against Ha: µ
What is the probability that a particular flight will carry : What is the probability that a particular flight will carry between 455 to 460 and passengers?
Create function to rotate the array : Write a program that allows users to input an integer for the size of an array. Randomly generate an integer for each element of the array.
What are the objectives of worker compensation laws : What are the objectives of worker's compensation laws? How do you describe the employers' obligations under these laws?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd