Question
C++ A bus company has passenger service from Marseille to London. This service has several stops which are Marseille, Montpellier, Toulouse, Paris, Lille, London. A
C++
A bus company has passenger service from Marseille to London. This service has several stops which are Marseille, Montpellier, Toulouse, Paris, Lille, London. A passenger may travel between any two stops, for example from Marseille to Toulouse, or Paris to London. Define the following classes to manage the passenger reservation system of the bus company for this route.Set, get, constructors as well as destructors should be included. There should be a print function for every class that outputs all the data members of that specific class.
The following classes should be defined:
Date with data members : day, month,year
Person with data members: The date of birth of the person from the class Date & the name of the person as a string
Reservation with data members: a Person object from the class Person, a counter that creates reservation numbers, a variable as a reservation num (the counter is incremented by 1 everytime there is a reservation), the travelling date (from the class Date), destination, starting city, number of seats requested in the reservation (5 max)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started