The document provides instructions for a final programming project for a Programming Principles course. Students are asked to create an airport reservation system that stores customer and flight information in a database. The program must include menus to view flights by airline, search for customers and flights, view boarding passes, and backup the database. Random customer and flight data will be generated on startup. Comments, indentation and error-free code are required. The project is due by email before the final exam.
Ensure the security of your HCL environment by applying the Zero Trust princi...
Comp 255 Project F2009
1. COMP-255A Programming Principles II
Fall 2009
Lecturer: Dr Constandinos Mavromoustakis
Email: mavromoustakis.c@unic.ac.cy
Programming Project
(mandatory)
(Released 7/12/2009)
INSTRUCTIONS:
Answer ALL questions. Submit by email your program and clearly indicate the name of the course
and the section (COMP-255 C++ Language Programming) and your name and student id number.
The examiner will attach great importance to the quality of code. Marks will be deducted for poor
programming style. The program should be commented and indented to aid clarity.
The program must not have any errors after the compilation phase, otherwise a grade zero will be
assigned.
This is an individual project and should represent your own ideas, work and effort. In cases of
plagiarism, a grade zero will be assigned to all parties involved.
SUBMISSION
In addition to your well-decomposed, well-commented solution to the assignment, you should submit
a README containing instructions of how a user can run the program as well as specifying the
number of available logged users that the system can handle. For the submission of the final version
of the project a directory should be created with the NAME of each student and the ID number of
each student in the form of NAME_ID (as Dir). When you are ready to submit, make sure that you
have the above created Dir and the associated class(es) or files with your submission.
HINTS:
Your main program should work as a menu where all the required choices are displayed for the user
to choose from. You should make sure that your program is as robust as possible. That is, it does not
terminate with fatal errors unexpectedly in case of user error. It should validate input where necessary
and allow the user to re-enter the required information.
USE ONLY IN YOUR C++ CODE THE STRUCTURES THAT YOU LEARN IN THIS COURSE.
Deadline is 13/01/2010, before the final examination, by email (ONLY).
No projects will be accepted after this deadline.
2. Simulated sample of the operations performed in an airport system
(Note that you are free to create your own scenario based on the learnt material covered in Programming Principles II)
You are asked to create a kind of a database which utilizes an airport system located in a certain
International airport. The system will have reservation capabilities for customer’s on-demand
reservation and booking finding abilities. The program will also enable the end-user to select a seat in
the airplane if i.e. there is a placement in a certain flight and thereafter to select the meal and or the
drinks in the flight. The information which is required has to be kept in the database for each
customer/potential customer, and should include the following attributes:
PRIMARY MENU OPTIONS
• Flight Code and flight Number->flight operator (British Airways, Cy Airways et.c)
• Name, Surname of the customer or potential customer
• Address(optional-only required for permanent customers)
• Kind of membership ->Economy/Silver/Gold
• If the customer used previously the flight operator.
• Flight Code and flight Number details Arrival place and date
• Cost price
• Special requirements->Use Your Own Scenarios for the creation of the application-
specific menu
(In order to have more flexibility in the data structures and how all the data is manipulated, you
may use Classes and/or Structs to represent for example Customer/Flight)
There must be a user interface approach with an initial option selected from the Main
(primary) MENU. The menu must include a “key” by which the user can find at any time a certain
flight and/or customer on a certain flight et.c (whether he/she/it is in the database system or not). The
selection “key” will be the customer’s ID or Flight Code or/and flight Number -or an attribute that
you find it appropriate. You should also use combined attributes for this search. You should create a
database-like structure, with store capabilities of 150 different possible Names, Surnames of the
customers or potential customers. The program has to be able to back up all these attributes
(information) contained in the database by an option selected from the main (primary) MENU. The
created /saved file will be called backup.bak.
The primary MENU should be able to provide all the required information to the end-user like
the history log of his/her flight activities and history of flight activities took place for that particular
COMP Final scenario-based project for Programming Principles/Fall 2009
Lecturer: Dr. Constandinos X. Mavromoustakis
255A
3. flight company. The primary MENU of the program should include functions supporting the tasks of
the MENU that follows. The menu should provide information to an operator who will have to log-in
in order to have access to the following menu:
Airport system Main Menu
1. Log-in-> MENU (MENU OPTIONS) /Primary MENU
2. Quit
Once the user is logged-in via the system’s MENU, the system should be randomly initialized in order
to place random customers and place them in random flights. During initialization the customer will
be randomly created and randomly set in random flights for random destinations (see notes***).
Thereafter the MENU of the program with the appropriate functions is presented.
A sample and tentative initial menu may look as follows on an initial screen:
Airport system Main Menu (use it as a sample)
1. Show all flights of a certain airline->Insert the Flight Operator
of the airline->Arrivals or Departures
2. Flight Code and flight Number-> Flight Operator (British
Airways, Cy Airways et.c)->Insert name of the customer
3. Show the Boarding form of a certain customer-> Name,
Surname or ID, flight Route & other details (i.e. seat number)
4. Search for a customer->Name, Surname or ID
5. Search for a flight-> Flight Code and flight Number / time of the flight ->flight
Route ->Use Your Own Scenarios for the creation of the application-specific menu
6. Search for a customer’s history-> Name, Surname or ID
7. Backup in a File all information**
8. Log off*
COMP Final scenario-based project for Programming Principles/Fall 2009
Lecturer: Dr. Constandinos X. Mavromoustakis
255A
4. ** Additional grade-bonus of 3% will be given, if a “name.bak” (name-it) option in the primary MENU option for “Backing-up
in a File” is supported, where name.bak is a name that an end-user is asked.
***For the Random Number Generation you may use the RNG provided by the C++ core std/standard library.
You should also include a Readme.txt file where you should explain the following:
How to use the program
How to use the MENU of your proposed scenario based on the manipulation of the structures
used (Classes and/or Structs et.c.)
How the structures used are manipulated
o The comments in your program if any of them are not clarified in the source code-
lines.
Essential Note:
In your provided code you should use all the conceptual C++ structures which have been acquired by the
students in the class (i.e Structs and/or Classes including Object Orientation with Objects and Classes
and class member functions, Data Structures including Structures, arrays of structures, structures as
function arguments, passing a pointer, returning structures, dynamic data structure allocation, searching
an array of structures and Files.
COMP Final scenario-based project for Programming Principles/Fall 2009
Lecturer: Dr. Constandinos X. Mavromoustakis
255A