e i couldn't understand the previous answer,if you can explain more detailed or easy it would be really good for me. Assignment Write a program in C++ that will track certain information about the flights of aircrafts. You will create your program by referencing the structure given in the diagram (1)(Diagram is attached). Class definitions, access specifiers, data members and member functions in your program must be coherent with the diagram. Certain essential variables for operations such as loops, flag values, counts etc. are not given in the diagram therefore you can define them as your own extra variables in the program 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 cl
Note:I asking this question again because i couldn't understand the previous answer,if you can explain more detailed or easy it would be really good for me.
Assignment
Write a
will create your program by referencing the structure given in the diagram (1)(Diagram is attached). Class
definitions, access specifiers, data members and member functions in your program must be
coherent with the diagram. Certain essential variables for operations such as loops, flag
values, counts etc. are not given in the diagram therefore you can define them as your own
extra variables in the program
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 calculate 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.Important Remarks:
• You can use the help of swap() function while ordering the landings and launches. This function is contained in the header file of #include
• You can use the help of any sorting
• You are expected to use the help of passing objects as references, this operators, logical conditions, abilities of inheritance in OOP, any necessary extra calculations etc. during your program.
• If there are two or more flights that overlap during the launch or the landing, their states will be changed from the default value of “Idle” to “Delayed”, other values will be printed normally
(Outputs should be like in the screenshot)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps