Question: Implementation of Classes Need help with a C++ program ( please dont copy and paste from the internet just a baisc program not to complex

Implementation of Classes

Need help with a C++ program ( please dont copy and paste from the internet just a baisc program not to complex that excute properly)

Consider the Passenger data structure we discussed during the last class.

Instead of using struct, we will use object-oriented class.

Create a hierarchy of 3 classes to support Party, Person and Passenger, where each inherits from its parent.

The attributes that define a Party are:

- Party Type Code (P = person, O = organization)

- Address (one large string)

- Phone Number (one string)

The attributes that define a Person are:

- Date of Birth

- First Name

- Last Name

The attributes that define a Passenger are:

- Ticket Number

- Frequent Flyer Number (valid alphanumeric or N/A)

- Ticket Price

- Flight Number

- Seat Location

- Flight Date

- Status (T = ticketed, H = on hold, C = cancel

The following functions are to be implemented:

(1) Purchase a ticket. This will create a passenger as an inheritance of both person and party.

(2) Change a passengers seat location. Assume that all seats are available.

(3) Cancel the ticket.

Provide a user interface via Cout and Cin to obtain the information.

Print a confirmation when the transaction is complete.

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!