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.
_________________________________________________________________
//i need more explanations :(
#include#includeusing namespace std;class flight{protected:string flight_name;int launch_hour;int launch_min;int land_hour;int land_min;int duration;string state;public:flight(string state="Idle"){this->state=state;}void check();int get_launch_hour();int get_launch_min();int get_land_hour();int get_land_min();int get_duration();string get_state();void set_state(string);void set_duration(int);void calculate_landing();};int flight::get_duration(){return duration;}void flight::set_duration(int a){duration=a;}int flight::get_launch_hour(){return launch_hour;}int flight::get_launch_min(){return launch_min;}int flight::get_land_hour(){return land_hour;}int flight::get_land_min(){return land_min;}string flight::get_state(){return state;}void flight::set_state(string s){state=s;}void flight::calculate_landing(){int time;launch_hour*=60;time=duration+launch_hour+launch_min;//time=610land_hour=time/60;//land hour=10land_min=time-land_hour*60;launch_hour/=60;}void flight::check(){}class flight_schedule:public flight{};class flight_controller:public flight_schedule{};class launch_controller:public flight_controller{protected:int launch_hour;int launch_min;int launch_hour1;int launch_min1;public:};class landing_controller:public flight_controller{protected:int land_hour;int land_min;int land_hour1;int land_min1;public:};int main(){flight_schedule *ft[3]={new flight_schedule,new flight_schedule,new flight_schedule};for( int i=0 ; i<3; i++="">3;>{cout<"enter the="" name="" of="" the="" flight:="">"enter>ft[i].get_state();cout<"enter the="" departure="" time="" of="" the="">"enter>ft[i].get_launch_hour();ft[i].get_launch_min();cout<"enter the="" duration="" of="" the="" flight="" in="">"enter>ft[i].get_duration();cout<><>}}Extracted text: cmpe225_hw1 (1).pdf 5 / 6 159% + Tam ekrandan çıkmak için F11 tuşuna basın 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 C Launch at 11 : 25 Flight State: IDLE 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 continueExtracted text: cmpe225_hw1 (1).pdf 2 / 6 135% + Assignment Write a program that will track certain information about the flights of aircrafts. You will create your program by referencing the structure given in the diagram (1). 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. LaunchController LandingController -launchHour1: int - launchHour2: int - launchMin1: int landHour1: int - landHour2: int - landMin1: int - launchMin2: 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 FlightSchedule duration: int - flights[]: Flight - state: string + method(type): type + getlaunchHour(): int + getLaunchMin(): int + getlandHour(): int + getLandMin(): int + getState(): string + setState(string): void + calculatelanding(): void
Extracted text: cmpe225_hw1 (1).pdf 5 / 6 159% + Tam ekrandan çıkmak için F11 tuşuna basın 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 C Launch at 11 : 25 Flight State: IDLE 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 continueExtracted text: cmpe225_hw1 (1).pdf 2 / 6 135% + Assignment Write a program that will track certain information about the flights of aircrafts. You will create your program by referencing the structure given in the diagram (1). 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. LaunchController LandingController -launchHour1: int - launchHour2: int - launchMin1: int landHour1: int - landHour2: int - landMin1: int - launchMin2: 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 FlightSchedule duration: int - flights[]: Flight - state: string + method(type): type + getlaunchHour(): int + getLaunchMin(): int + getlandHour(): int + getLandMin(): int + getState(): string + setState(string): void + calculatelanding(): void
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here