Reference no: EM132194425
Write a C++ class for an airplane.
The Airplane class should have three data members type of airplane (character array of SIZE 50). current flying speed, and maximum flying speed (both of type double).
The class should have the following methods:
Write a C++ program that creates two airplane objects, plane1 and plane2 and then invokes methods to fly the planes at a particular speed.
Use c out statements to announce the speed of the airplane.
Assign a maximum speed to your Airplane objects to prevent an airplane from flying faster than its maximum speed.
You should have the header file (i.e. class definition) as airplane. h, the implementation file (that is the class methods definition) as airplane.cpp, and the driver airplanedrvr.cpp AS examples use 747 and 777 as types.
For plane 1 set maximum speed to 1000, and for plane2 to 1500. For plane 1 set current speed to 700. and for plane2 to 1200.
What happens if for example you set for plane1 the current speed to 1200. and for plane2 to 1700.
When you write the method you should take this into consideration.