Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database And Transact SQL

Authors: Lucy Scott

1st Edition

1974679985, 978-1974679980

More Books

Students also viewed these Databases questions

Question

13. Integrate given function?

Answered: 1 week ago

Question

What is the meaning and definition of E-Business?

Answered: 1 week ago

Question

7-16 Compare Web 2.0 and Web 3.0.

Answered: 1 week ago