Example Outputs Output 1 Enter the name of the flight: A Enter the departure time of the plane: 10 10 Enter the duration of the flight in minutes: 70 Enter the name of the flight: B Enter the...


Example Outputs<br>Output 1<br>Enter the name of the flight: A<br>Enter the departure time of the plane: 10 10<br>Enter the duration of the flight in minutes: 70<br>Enter the name of the flight: B<br>Enter the departure time of the plane: 10 20<br>Enter the duration of the flight in minutes: 15<br>Enter the name of the flight: C<br>Enter the departure time of the plane: 11 25<br>Enter the duration of the flight in minutes: 90<br>Launch Order<br>A Launch at 10 : 10 Flight State: IDLE<br>B Launch at 10 : 20 Flight State: IDLE<br>C Launch at 11 : 25 Flight State: IDLE<br>Landing Order<br>B Landing at 10 : 35Flight State: IDLE<br>A Landing at 11 : 20Flight State: IDLE<br>C Landing at 12 : 55Flight State: IDLE<br>Process exited after 24.81 seconds with return value e<br>Press any key to continue<br>

Extracted text: Example Outputs Output 1 Enter the name of the flight: A Enter the departure time of the plane: 10 10 Enter the duration of the flight in minutes: 70 Enter the name of the flight: B Enter the departure time of the plane: 10 20 Enter the duration of the flight in minutes: 15 Enter the name of the flight: C Enter the departure time of the plane: 11 25 Enter the duration of the flight in minutes: 90 Launch Order A Launch at 10 : 10 Flight State: IDLE B Launch at 10 : 20 Flight State: IDLE C Launch at 11 : 25 Flight State: IDLE Landing Order B Landing at 10 : 35Flight State: IDLE A Landing at 11 : 20Flight State: IDLE C Landing at 12 : 55Flight State: IDLE Process exited after 24.81 seconds with return value e Press any key to continue
Your program will have a class called FlightController that is going to be derived from two<br>base classes which are called LaunchController and LandingController. The FlightController<br>class inherits all accessible data fields and methods from the LandingController and<br>LaunchController classes.<br>Inside the FlightController class, you will define an object of type FlightSchedule which will<br>contain an array of 3 objects of type Flight. In your Flight objects, the constructor of these<br>objects will ask from the user for the inputs of flight name, launch hour, launch minutes,<br>flight duration. The value of state of the Flight object will be assigned to “Idle

Extracted text: Your program will have a class called FlightController that is going to be derived from two base classes which are called LaunchController and LandingController. The FlightController class inherits all accessible data fields and methods from the LandingController and LaunchController classes. Inside the FlightController class, you will define an object of type FlightSchedule which will contain an array of 3 objects of type Flight. In your Flight objects, the constructor of these objects will ask from the user for the inputs of flight name, launch hour, launch minutes, flight duration. The value of state of the Flight object will be assigned to “Idle" as a default value in the constructor also and you will call the member function within the Flight class which will caleulate the landing time for your flight object by using the duration and the launch time. Definition of Flight class will also contain the necessary getters and setters that are given in the diagram and needed throughout your program. In the constructor of your FlightController you will need to define a pointer that will point to the adress of the FlightSchedule object you have created. You will send that pointer into the functions launchSchedule and landingSchedule in your base classes and these functions will perform a sorting operation between these three flight objects. The launchController will check the launch times as in hours and minutes of the array of objects that you have passed as a reference and will sort the array in ascending order. After the sorting you will output the launch order of these flights in order. Similar approach will be taken in the landingController and the landing order will be displayed as output after the sorting is complete. Outputs will consist of flight name, landing hour, landing minute, flight's state and they will be printed from top down in order. Same thing will hold for both of the landing and launch controllers. Class definitions for both the landingController and the launchController must also contain all of the necessary members and variables in correct access specifiers and expected types. After successfully displaying the ordered ouputs for launches and landing , the program will end. DEV
Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here