Use C++ Write a class named Aircraft that has the following member variables: In addition, the class should have the fol
Posted: Mon May 09, 2022 6:17 am
Use C++
Write a class named Aircraft that has the following member
variables:
In addition, the class should have the following member
functions.
Demonstrate the class in a program that creates an Aircraft
object and then calls the accelerate function five times. After
each call to the accelerate function, get the current speed of the
aircraft and display it. Then, call the brake function five times.
After each call to the brake function, get the current speed of the
aircraft and display it.
After testing the accelerate and brake functions, call the
function to change the engine type and pass it a value for a
different engine. display the state of the Aircraft
using the toString function
Write a class named Aircraft that has the following member
variables:
In addition, the class should have the following member
functions.
Demonstrate the class in a program that creates an Aircraft
object and then calls the accelerate function five times. After
each call to the accelerate function, get the current speed of the
aircraft and display it. Then, call the brake function five times.
After each call to the brake function, get the current speed of the
aircraft and display it.
After testing the accelerate and brake functions, call the
function to change the engine type and pass it a value for a
different engine. display the state of the Aircraft
using the toString function