CSC103 PF-Assignment 3
CSC103 PF-Assignment 3
Write a program that can be used to assign seats for a commercial airplane. The airplane has 13 rows, with six
seats in each row. Rows 1 and 2 are first class, rows 3 through 7 are business class, and rows 8 through 13 are
economy class.
Your program must prompt the user to enter the following information:
Make this a menu-driven program; show the user’s choices and allow the user to make the appropriate
choices. Your program should display the following menu of alternatives:
If the person types 1, assign a seat in the first-class section (row 1–2). If the person types 2, assign a seat in
the business-class section (row 3–7). If the person types 3, assign a seat in the economy section (row 8–13).
When the all the seats in his/her preferred class are already reserved, your program should ask the person if
it’s acceptable to be placed in another available section. If yes, then make the appropriate seat assignment.
Page 1 of 2
Then, the program should either reserve the seat or warn the user if the seat is already occupied. The program
must keep on prompting the user for seats reservation if another seat of the same class is available or until
he/she wants to quit.
The program at the end should display the seat reservation map in the following format.
Here, * indicates that the seat is available; X indicates that the seat is occupied.
Hint: Create a 2D array (13x6 size) of integers with values 0 assigned to all elements initially. In order to reserve
a seat, make the corresponding element 1.
• The submission of the program should consist of two folders. One folder for the Project Folder and a
second folder for the Program Documentations.
• General Documentations Requirements and Grading Criterion are described in Microsoft word
document “_README” file available in the folder “Documentation Templates”.
• You have to apply the analysis/design/coding steps (e.g. Problem Analysis, Variables, Named
Constants, Formulas, Main Algorithm and its Flow Chart etc.). This is MANDATORY.
• Follow program style instructions such as indentation, meaningful variables names in camel-case
style, comments, etc.
Page 2 of 2