\"margin:0in 0in .0001pt;font-size:medium;font-family:\'Times New Roman\', serif
ID: 3535550 • Letter: #
Question
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Write a
program that can be used by a small theater to sell tickets for
performances.  The
theater’s auditorium has 15 rows of seats with
20 seats in each row.Â
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
Â
"margin:0in 0in .0001pt;font-size:medium;">
"font-size:small;">step 1:Â
"font-family:'times new roman', times;font-size:small;">Â The
program should have a FUNCTION that displays a screen
that shows which seats are available and which are
taken.  Seats that are taken should be
represented by a # symbol and seats that are available should be
represented by a *
symbol.    The
first thing your program should do is initialize all of the seats
to available (*) and display the seating
chart.  (HINT: The seating chart should be
a two dimensional array.)Â Â Here is an
example of the seating chart with all seats initialized to
available.
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
Â
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Seats:Â Â Â Â Â 0Â Â 1Â Â 2Â Â 3Â Â 4Â Â 5Â Â 6Â Â 7Â Â 8Â Â 9Â Â 10
11 12 13 14 15 16 17 18 19
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
0Â Â Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
1Â Â Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
2Â Â Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
3Â Â Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
4Â Â Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
5Â Â Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
6Â Â Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
7Â Â Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
8Â Â Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
9Â Â Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
10Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
11Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
12Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
13Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Row
14Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *Â Â Â *
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
Â
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">step
2:Â Â Each row in the auditorium has a
different ticket price.  So tickets in row
0 may be 5.00 each and tickets in row 1 may be 10.00
each.  Your program should have a FUNCTION
that reads the ticket price of each row from an input file called
prices.dat.  The ticket price for each row
should be stored in a one dimensional array.
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Â
"margin:0in 0in .0001pt;font-size:medium;">
"font-size:small;">step 3:
"font-family:'times new roman', times;font-size:small;">Â Your
program should have variables tracking the total number of tickets
sold and the total revenue for all tickets sold.
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">step
4:
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">Your
program should allow the user to sell tickets one at a
time.  The user should be able to sell as
many tickets as they would like (you need a loop for this). Do this
with some sort of prompt or menu asking the user if they would like
to sell another
ticket.  Don’t forget to
validate input data if you need to.
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
Â
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
Â
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">To allow
the user to sell a ticket your program should have the user enter a
row number and a seat number for the ticket they would like to
sell.  The program should do four things
with this information:Â
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
Â
"margin:0in 0in .0001pt .5in;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">1.  It
should check to see if the seat is
available.  If the seat is taken the
program should not allow the user to sell the
ticket.  If this happens, print a message
to the user saying the ticket is not available and prompt the user
to see if they would like to sell another
ticket.Â
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;text-indent:.5in;">
Â
"margin:0in 0in .0001pt .5in;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">2.  If
the seat is available the program should update the seating chart
by putting a taken symbol (#) in that seat’s
position in the chart.
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;text-indent:.5in;">
Â
"margin:0in 0in .0001pt .5in;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">3.   The
program should then look up the row price for the seat
sold.  Your program should have a variable
tracking the total revenue, the price of the seat sold should be
added to this total after each sale.
"margin:0in 0in .0001pt .5in;font-size:medium;font-family:'Times New Roman', serif;">
Â
"margin:0in 0in .0001pt .5in;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">4.  Your
program should have a variable tracking the total tickets
sold.  The next thing your program should
do when selling a ticket is update the total tickets
sold.
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
Â
"margin:0in 0in .0001pt;font-size:medium;">
"font-size:small;">step
5:
 Once the user is finished selling tickets
print out an updated seating chart followed by the total tickets
sold and the total revenue generate from those
tickets.Â
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
Â
"margin:0in 0in .0001pt;font-size:medium;font-family:'Times New Roman', serif;">
"font-size:small;font-family:'times new roman', times;">
NOTE:Â Â You are required to use two arrays
in this program, one for the seating chart and one to store the
prices for each row.  You are also required
to use two functions:Â Â one to display the
seating chart and one to read in the price per row data and store
it in the array with the prices for each row in
it.  You may use other functions if you
want to but they are not required.Â
Explanation / Answer
there are a lot of spaces here cant get the question completely.mail me at varunjain850@gmail.com.I will solve and send it back to you in 3 hours.Please rate me here first.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.