Question: class Date { public: int day, month, year; Date(int day_, int month_, int year_) : day(day_), month(month_), year(year_){} }; -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- class Time { public: int

 class Date { public: int day, month, year; Date(int day_, int

class Date

{

public:

int day, month, year;

Date(int day_, int month_, int year_) : day(day_), month(month_), year(year_){}

};

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

class Time

{

public:

int hour, minute;

Time(int hour_, int minute_) : hour(hour_), minute(minute_){}

};

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

class Flight

{

private:

string id;

string departurecity;

string arrivalcity;

Date departuredate;

Date arrivaldate;

Time departuretime;

Time arrivaltime;

public:

Flight();

Flight(string p_id, string p_departurecity, string p_arrivalcity, Date p_departuredate, Date p_arrivaldate, Time p_departuretime, Time p_arrivaltime);

string getFlightID();

string getDepartureCity();

string getArrivalCity();

Date getDepartureDate();

Date getArrivalDate();

Time getDepartureTime();

Time getArrivalTime();

void setFlightID(string p_name);

void setDepartureCity(string p_departurecity);

void setArrivalCity(string p_arrivalcity);

void setDepartureDate(Date p_departuredate);

void setArrivalDate(Date p_arrivaldate);

void setDepartureTime(Time p_departuretime);

void setArrivalTime(Time p_arrivaltime);

void print();

~Flight();

};

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

class Passenger

{

private:

int id;//passenger id

string name;

string address;

string telephone;

Date dob;

public:

Passenger();

Passenger(int p_id, string p_name, string p_address, string p_telephone, Date p_dob);

int getId();

string getName();

string getAddress();

string getTelephone();

Date getDob();

void setId(int p_id);

void setName(string p_name);

void setAddress(string p_address);

void setTelephone(string p_telephone);

void setDob(Date p_dob);

void print();

~Passenger();

};

Create a class called Booking that holds booking information when a passenger books a flight. The class should have the following attribute o - Booking number (int) o - Passenger object o - Flight object o - 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: PROVIDED CLASSES: passenger class, flight class, date class, time class, CLASSES TO MAKE: booking.h, booking.cpp, testbooking.cpp

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!