Question: Your assignment's C file name will be Code 6 _ xxxxxxxxxx . c where xxxxxxxxxx is your student id . I will refer to this

Your assignment's C file name will be Code6_xxxxxxxxxx.c where xxxxxxxxxx is your student id. I will refer to this file
in the rest of this document as Code6.c.
You are creating a program that will sell tickets to seats in a movie theater. You will set up the theater by asking how big the
theater is (row and seats per row). You will then ask how many tickets are needed. You will then allow the user to pick seats
in your theater. You will determine if the chosen seat is available or already sold. If the seat is already sold, then the user will
be prompted to pick a different seat. If the seat is available, then the seat will be sold.
Please watch the videos showing how the program is run before reading the rest of this document. Look over the
Code6_template.c file also before continuing.
1. Create three #defines at the top of the program. They should all be listed together so that the GTA may easily find
them and change them for testing. Please use the EXACT words.
MAX_ROWS set to 9
MAX_COLS set to 9
TICKET_LIMIT set to 4
2. main()
Create a char 2D array named MovieTheater of size MAX_ROWS by MAX_COLS
Prompt the user for how big the movie theater is. Ask for the number of rows and the seats per row. The user input
for number of rows should not be allowed to exceed MAX_ROWS and the user input for number of columns should not
be allowed to exceed MAX_COLS. Prompt the user to enter values until both values are in range. Any messages
referring to those maximums should use the #define values.
Call function FillMovieTheater() to initialize the array to 'O'(letter O not zero). Pass in the number of rows
and seats per row entered by the user. Pass in the ENTIRE array but only INITIALZE the part that matches the number
of rows and columns entered by the user.
Prompt the user for how many tickets to purchase. If user enters 0, then don't proceed. The user should only be
allowed to buy a maximum number of tickets (TICKET_LIMIT). The user input should not be allowed to exceed
that limit. Prompt the user for number of tickets until the entered value is in range (not less than 0 and not greater
than TICKET_LIMIT). Any messages referring to that limit should use the #define value.
While not all tickets have been sold
Call PrintSeatMap (see screenshots for format and required output)
Prompt the user for a seat choice
Translate the seat choice (A1, C2, etc) to an array row and array column value. For example, A1 is array row 0
and array column 0.
If the seat is not inside the theater, print message.
Else (you have a valid seat choice) if the seat has been sold (call function IsSeatSold)
Else increment the number of tickets sold because ticket was valid and had not been sold
3. FillMovieTheater
Return type void
Parameters 2D array of seat map, rows, seats

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!