Polymorphism and Virtual Function Members Project
Description
Study Section 15.6 (see attachment chapter 15.6 zipfile) – Polymorphism and Virtual Function Members.
Doing the following tasks using the attached code. (see attachment code zip file)
- In the provided AircraftTest program, set the maxMPHspeed to 219 for personalPlane and 410 for the companyPlane objects.
- In the AircraftTest program – set the currentMPH speed to 200 for both the personalPlane and companyPlane objects.
- In both the aircraft and commercialAircraft header files, create virtual methods in both classes named “getMyCurrentSpeed()”. It should return MPH for the Aircraft base class and KPH (Kilometers per Hour) for Commercial Aircraft. (This implies that the Commercial Aircraft method will convert MPH to KPH); The calculation to convert MPH to KPH is currentMPHspeed * 1.60934;
- In the provided AircraftTest program, create a single method named mySpeedIs( that is passed the base class by reference (&)). This method should call the getMyCurrentSpeed() method for the object passed and display the results.
- In the main() method in the AircraftTest program, call the above mySpeedIs method using the personalPlane object and then call the mySpeedIs method again passing it the companyPlane object for the 2nd call. These should have different results ( one is MPH, the other is KPH).
- Change the all Header comments to our standard class header with your name.
- Deliverable is the CPP program and 2 Header files.
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."