Question: 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
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 Rception flight.h #include #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 #include "flight-h" using namespace std:; flight: flightO void flight::setld(string idd) .. 11 Koodo 17:58 Rception 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 "
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
