1. Engineering
  2. Computer Science
  3. program to implement in c the classes of the question...

Question: program to implement in c the classes of the question...

Question details
Program to implement in c++ the classes of the question are defined below
Q3.(25 marks) Create a class called Booking that holds booking information when a passenger books a flight. The class should have the following attribute Booking number (int) - Passenger object - Flight object - Seat number (string), e.g, C20, A10, etc. The class should have at least the following member functions: -One or more constructors Necessary setters and getters A function that prints information about a booking A destructor Deliverables: classes from Q1 and Q2, booking.h, booking, cpp, testbooking.cpp
.Il Koodo令 17:58 Réception flight.h #include< iostream> #include-cstring> #include Time.cpp.. #include date.cpp.. using namespace std; class flight string id,city Time depTime,arrTime; Date depDate,arrDate; public flight0 void setld(string); void setCity(string); void setDate(int,int,int,int,int,int); void setTime(int,int,int,int,int,int); void printData0: -flightO: light.cpp # include< iostream> #include flight-h using namespace std:; flight: flightO void flight::setld(string idd)
.. 11 Koodo令 17:58 Réception void flight::setCity(string ct) city ct void flight::setDate(int arrD,int arrM,int arrY,int depD,int depM.int depY) arrDate.setDate(arrD,arrM,arrY) depDate.setDate depD,depM,depY); void flight::setTime int arrH,int arrM,int arrS,int depH,int depM,int deps) arrTime.setTime(arrH,arrM,arrS); depTime.setTime(depH,depM,depS); void flight::printData0 <<endl coutくくFight Details cendkc cout<<ID: <<idくくendl; cout<City: <city<<endl; cout<Arrival Time: arrTime.printTime0:cout< coutくぐDeparture Time endl; depTime.printTime0:cout<<endl cout<Arrival Date: arrDate.getDate0:cout< endl cout<ぐDeparture Time: .depDate.getDate();couKCendl flight::-flight0
111 Koodo令 17:58 < Réception flightflight0 class Passenger f private: int PassengerID std:string Name std:string Address std::string Tel; Date DateOfBirth; public: Passenger(int pld,string name) Passenger! D=pid; Name-name int getPassengerldo
.. 11 Koodo令 17:58 Réception return PassengerID; string getName0 return Name string getAddressOf return Address; void setAddress(string addr) Address = addr; string getTeloi return Tel; void setTel(string tel)
111 Kood。令 17:58 < Réception Tel-tel string getDateOfBirtho DateOfBirth.printDate0: void setDateOfBirth(int d,int m,int y) DateOfBirth.setDate(d,m.y); void printPassengerlnfo0 cout<Passengers ID: <PassengerlD<endl cout< Passengers Name:<Name< endl; cout<<Passengers Address: << Address< endl cout Passengers Tel: Tel cout Passengers Date of getDateOfBirth0: cout <<n <<endl cou <Passengers Name: s Name nd <endl; birth:
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution