The 'Airline Company' requires an application to track their planes, customer details and flight bookings. The company does not carry out 'regular' flights but is instead a charter company subcontracting to larger courier companies and also providing personal bookings. The company uses the following terminology:
Uses the planes tail tag as an aircraft identifier (XXX-123).
Can carry either Cargo only, Passengers only, or a mix of both.
Has a max capacity (number of passengers or KG's of cargo).
Maybe a return customer (uses the companies services many times).
Has a unique id, generated by the system.
Has personal/contact information.
Maybe an individual or a company.
Client does not have to be a passenger on the flight (especially the case for the cargo flights).
Each item must be registered and tracked for security reasons.
Moved on Cargo or Mixed planes.
Has a weight (in KG's).
Has a unique cargo id, supplied by the client.
Can be client or friends/colleagues of a client.
A person who travels on a flight.
For security reasons, personal information is kept.
Assigned a plane.
Booked by a client.
If a cargo booking, each cargo item is listed on the booking.
If a passenger booking, all passengers are listed on the booking.
Two locations in the world that a plane can travel between, a departure and arrival location.
Has a unique id that represents the booking.
Has a departure and arrival time.
You must provide a GUI application that supports the following functionality:
Persist all program data to disk. (format up to you).
Load all program data from disk.
Allow the creation/editing and retiring of planes.
Allow the creation/editing of Clients.
Allow the creation/editing and archiving of Bookings.
Allow bulk cargo manifests to be loaded from file when making a cargo booking.
Archived/Retired items are not shown unless specified by the user.
Allow the ability to see bookings for a client (filtered view of bookings by client)
The following business rules must be applied:
You may not over-book a plane (either with passengers/cargo)
You may not assign cargo to a passenger only plane, or a passenger to a cargo only plane.
You may not assign a plane to more than one booking scheduled at the same time (cant overlap)
A Booking requires a plane and client to be created/saved (planes can be changed after bookings created if needed).
To simplify this implementation the following assumptions can be made:
All bookings are return bookings (the planes always return to the shed after dropping people off).
Planes can always travel the distance between two locations (no fuel/distance concerns).