Project
This Assignment simulates a basic flight booking system. The system must allow the addition of customers and flights. It must also allow the booking of flights by existing customers.
The following functionality must be available from a menu.
Add Custome
Add flight
Add Booking
View flights
View Custome
View Flight
Exit
ADD CUSTOMER
This option should ask for all the information required to make a customer object and add it to a list of customers.
ADD FLIGHT
This option should ask for all the information required to make a Flight object and add it to a list of flights.
ADD BOOKING
When the “Add booking” option is selected, a list of all customers and all flights should be displayed first. The user must then be asked for the Customer id and flight id to make the booking for.
A booking can only be made if there is free space on the plane, the customer id exists and the flight id exists. All associated objects should be updated. An appropriate message as to whether the booking was successful or not should be displayed.
VIEW FLIGHTS
When “View flights” is selected, the flight number ,origin and destination for each flight must be shown.
VIEW CUSTOMERS
When “View customer” is selected a list of all th customer numbers and their names must me displayed..
VIEW FLIGHT
When “View flight” is selected, a list of all the flight number must be presented. The user must then be asked to choose one. The flight details with that flight number must be displayed. If the flight is not found, an appropriate message must be shown.
EXIT
When “Exit” is selected, a departing message thanking the user for using your system must be displayed
The Flight and Customer classes will be used to create objects that hold the information for a particular flight and customer respectively. NOTE: Getters for all state of the Flight and Customer classes must be added.
Custome
-customerId : int
-firstName :string
-lastName :string
-phone :string
+Customer(id,fName,lName,ph)
Flight
-flightNumber : int
-origin :string
-destination : string
-masSeats : int
-numPassengers : int
+Flight(flightNo,orig,dest,mSeats)
+addPassenger(cust:Customer):bool
+findPassenger(custId : int): int
+removePassenger(custId : int):bool
+getPassengerList(): string
Special Notes:
The flight.__str__ method must print all the flight information followed by all the names of the passengers on that flight.