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.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

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.

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
Transcribed Image 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
LaunchController
LandingController
|- launchHour1: int
- launchHour2: int
- launchMin1: int
|- launchMin2: Int
- landHour1: int
- landHour2: int
- landMin1: int
|- landMin2: int
+ launchSchedule(FlightSchedule" ): void
+ landingSchedule(FlightSchedule" ): void
Extends
Extends
FlightController
# flight_schedule: FlightSchedule
FlightController()
+ flights: FlightSchedule"
Flight
- flightName: string
|- launchHour: int
- launchMin: int
|- landHour: int
|- landMin: int
|- duration: int
- state: string
FlightSchedule
+ flights]: Flight
+ method(type): type
+ getlaunchHour(): int
+ getlaunchMin((): int
+ getlandHour(): int
+ getlandMin(): int
+ getState(): string
+ setState(string): void
+ calculateLanding(): void
Transcribed Image Text:LaunchController LandingController |- launchHour1: int - launchHour2: int - launchMin1: int |- launchMin2: Int - landHour1: int - landHour2: int - landMin1: int |- landMin2: int + launchSchedule(FlightSchedule" ): void + landingSchedule(FlightSchedule" ): void Extends Extends FlightController # flight_schedule: FlightSchedule FlightController() + flights: FlightSchedule" Flight - flightName: string |- launchHour: int - launchMin: int |- landHour: int |- landMin: int |- duration: int - state: string FlightSchedule + flights]: Flight + method(type): type + getlaunchHour(): int + getlaunchMin((): int + getlandHour(): int + getlandMin(): int + getState(): string + setState(string): void + calculateLanding(): void
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY