0% found this document useful (0 votes)
4 views2 pages

CSC103 PF-Assignment 3

The document outlines a programming assignment for the course CSC103, focusing on creating a seat reservation system for a commercial airplane. The program must allow users to select ticket types and desired seats, handle seat availability, and display a reservation map. Submission requires two folders for the project and documentation, along with adherence to specific coding and documentation guidelines.

Uploaded by

Muhammad Abraiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

CSC103 PF-Assignment 3

The document outlines a programming assignment for the course CSC103, focusing on creating a seat reservation system for a commercial airplane. The program must allow users to select ticket types and desired seats, handle seat availability, and display a reservation map. Submission requires two folders for the project and documentation, along with adherence to specific coding and documentation guidelines.

Uploaded by

Muhammad Abraiz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Campus, Defence Road, Off Raiwind Road Lahore

Ph: 042-99203109 Fax: 042-99205253


Department of Electrical Engineering
Programming Assignment – Spring 2025
Course Title: Programming Fundamentals Course Code: CSC103 Credit Hours: 4(3,1)
Instructor/s: Dr. Saleem Akhtar and Umair Shafiq Khan Programme Name: BSEE
Semester: 2nd Batch: Fall 2024 Section: A&B Due Date: April 25, 2025
Assignment Chapter 8 (Theory + Lab) [CLO2] Maximum Marks: 10

Programming Exercise: Airplane Seating Assignment

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:

a. Ticket type (first class, business class, or economy class)


b. Desired seat

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:

Please type 1 for "first class"

Please type 2 for "business class "

Please type 3 for "economy"

Please type 4 to quit without reservation

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.

Detailed Programming and its Submission Instructions:

• 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

You might also like