0% found this document useful (0 votes)
159 views

Week008 MachineProblem2

This document provides instructions for a C++ programming activity where students create a program to reserve seats. It asks students to: 1) Use a 2D array to represent seats and allow input of seat numbers during runtime 2) Replace the chosen seat number with 0 and display a message confirming the reservation 3) Not allow reservation of previously reserved seats or invalid numbers and display error messages 4) Record a video demonstrating the coding and output of the program meeting the requirements.

Uploaded by

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

Week008 MachineProblem2

This document provides instructions for a C++ programming activity where students create a program to reserve seats. It asks students to: 1) Use a 2D array to represent seats and allow input of seat numbers during runtime 2) Replace the chosen seat number with 0 and display a message confirming the reservation 3) Not allow reservation of previously reserved seats or invalid numbers and display error messages 4) Record a video demonstrating the coding and output of the program meeting the requirements.

Uploaded by

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

Course Code CS201

Description Computer Programming 1

Machine
Title of
Problem 002 Seat Reservation
Activity
No.
Page 1 of 2
LABORATORY EXERCISE

In this activity, you are to create a C++ program in VS code that satisfies specific requirements to attain
specific output.

Objective/s:
At the end of this activity, the students are expected to be able to:
 declare a two-dimensional array and other variables that will hold the required data
 use conditional and looping statements accordingly
 display the required output

Material/s Needed:
 Screen Recording Software
 Visual Studio Code
 MinGW

Procedure:
1. Create a video that shows yourself doing the machine problem.
2. The video should also show the screen of VS code as the program is coded.
3. The output window should be seen in the video as data is entered and the corresponding output
of the program is displayed.

Questions:(to be answered within the video)

Write a C++ program with the following specifications:


1. Use two-dimensional array with size 7 columns and 5 rows.
2. Seat numbers are populated during run-time.
3. User is asked to input a seat number.
4. Seat number chosen is replaced by 0.
5. Program displays a remark “Seat successfully reserved” when reservation is done.
6. User is not allowed to reserve a previously reserved seat. Display “Seat is taken” remarks.
7. User is not allowed to enter an invalid seat number. Display an error message.
8. Program continuously loops.

1
Course Code CS201

Description Computer Programming 1

Machine
Title of
Problem 002 Seat Reservation
Activity
No.
Page 2 of 2
LABORATORY EXERCISE

Sample Output:
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 32 33 34 35

Enter seat number to reserve : 11

1 2 3 4 5 6 7
8 9 10 0 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 32 33 34 35

Enter seat number to reserve :

INSTRUCTIONS FOR THE STUDENTS:


 The filename of your lab activity should be:
“<Last Name><First Name>-MachineProblem0<XX>”
 Provide screenshots of your VS codes and program output copied to a Word file.
 Save your video file in “.mp4” or “.avi” format only.
 Upload your video to Google drive or any video sharing website such as YouTube and Vimeo.
 Copy the video link to a Word file, together with the screenshots of your VS codes and program
output.
 Upload the Word file to the link provided for the activity in the LMS.

You might also like