A program that keeps track of ticket sales for an auditorium

Assignment Help Basic Computer Science
Reference no: EM13163460

Design a program that keeps track of ticket sales for an auditorium. A concert will be performed over three days in an auditorium with three levels of seating floor, balcony, and upper balcony. There are 20 seats for each type of seating. Write a program that initializes all seats to the '*' character. Allow a user to request a seat for a particular seat assignment area on a specific day. Use a three-dimensional array to keep track of the ticket sales. The first dimension indicates the performance day: T for Thursday, F for Friday, and S for Saturday. The second dimension indicates the type of seating: F for floor, B for balcony, and U for upper balcony. The third dimension indicates if a seat is sold, using S for sold.

The floor seats sell for $30, the balcony seats sell for $20, and the upper balcony seats sell for $10 each. The program must allow input of ticket requests until an X is entered to indicate that no more sales will be made. After the close of sales, calculate the amount of ticket sales for each performance for each day. Calculate the number of each type of seat sold for each day. Calculate the sales amount for each performance for each day. Calculate the total number of seats sold for all performances.

The following is a copy of the screen results that might display after running your program, depending on the data entered. The input entered by the user is shown in bold.

Sample Run:

 

This program keeps track of ticket sales for an auditorium. Tickets are available for three

days--Thursday, Friday, and Saturday--for 20 seats in each of three levels: the floor, balcony,

and upper balcony.

 

Enter day, (T)hursday, (F)riday, (S)aturday for concert, (X)closed

Enter level, (F)loor, (B)alcony, (U)pper Balcony

TF

Enter day, (T)hursday, (F)riday, (S)aturday for concert, (X)closed

Enter level, (F)loor, (B)alcony, (U)pper Balcony

TF

Enter day, (T)hursday, (F)riday, (S)aturday for concert, (X)closed

Enter level, (F)loor, (B)alcony, (U)pper Balcony

FU

Enter day, (T)hursday, (F)riday, (S)aturday for concert, (X)closed

Enter level, (F)loor, (B)alcony, (U)pper Balcony

FU

Enter day, (T)hursday, (F)riday, (S)aturday for concert, (X)closed

Enter level, (F)loor, (B)alcony, (U)pper Balcony

FU

Enter day, (T)hursday, (F)riday, (S)aturday for concert, (X)closed

Enter level, (F)loor, (B)alcony, (U)pper Balcony

SB

Enter day, (T)hursday, (F)riday, (S)aturday for concert, (X)closed

Enter level, (F)loor, (B)alcony, (U)pper Balcony

SB

Enter day, (T)hursday, (F)riday, (S)aturday for concert, (X)closed

Enter level, (F)loor, (B)alcony, (U)pper Balcony

SB

Enter day, (T)hursday, (F)riday, (S)aturday for concert, (X)closed

Enter level, (F)loor, (B)alcony, (U)pper Balcony

FB

Enter day, (T)hursday, (F)riday, (S)aturday for concert, (X)closed

Enter level, (F)loor, (B)alcony, (U)pper Balcony

FB

Enter day, (T)hursday, (F)riday, (S)aturday for concert, (X)closed

Enter level, (F)loor, (B)alcony, (U)pper Balcony

TB

Enter day, (T)hursday, (F)riday, (S)aturday for concert, (X)closed

Enter level, (F)loor, (B)alcony, (U)pper Balcony

TB

Enter day, (T)hursday, (F)riday, (S)aturday for concert, (X)closed

Enter level, (F)loor, (B)alcony, (U)pper Balcony

x

Thursday Floor Tickets sold : 2 $60

Balcony Tickets sold : 2 $40

Upper Balcony Tickets sold : 0 $0  

Friday Floor Tickets sold : 0 $0

Balcony Tickets sold : 2 $40

Upper Balcony Tickets sold : 3 $30

Saturday Floor Tickets sold : 0 $0

Balcony Tickets sold : 3 $60

Upper Balcony Tickets sold : 0 $0  

Total Floor tickets sold for all concerts : 2 $60

Total Balcony tickets sold for all concerts : 7 $140

Total Upper Balcony tickets sold for all concerts : 3 $30

Total tickets sold for all concerts : 12 $230

Total tickets sold for Thursday concerts : 4 $100

Total tickets sold for Friday concerts : 5 $70

Total tickets sold for Saturday concerts : 3 $60

 

 

Reference no: EM13163460

Questions Cloud

Find all irreducible polynomials : Find all irreducible polynomials1. of degree 3 over GF(2),2. of degree 4 over GF(2).
State responsibility and environmental regulation : What are three jurisdiction -what can they make a state do? Do they have any power over a company?
What mass of indium is present : A sample of indium sulfate, In2(SO4)3, contains 0.0446 moles of oxygen. What mass of indium is present?
What was the initial concentration : A zero-order reaction has a constant rate of 2.90×10-4 M/rm s. If after 65.0 seconds the concentration has dropped to 9.00×10-2 M, what was the initial concentration.
A program that keeps track of ticket sales for an auditorium : Design a program that keeps track of ticket sales for an auditorium. A concert will be performed over three days in an auditorium with three levels of seating floor, balcony, and upper balcony. There are 20 seats for each type of seating. Write a pro..
What would be the final pressure : A gas is heated from 268 K to 290 K while its volume is increased from 25.0 L to 37.0 L by moving a large piston within a cylinder. If the original pressure was 0.90 atm, what would be the final pressure?
What is the molar mass of the metal : In this experiment a hot metal block at 100oC is added to cold water in a calorimeter. The heat lost by the metal block equals the heat gained by the water and the two end up at the same temperature.
The irreducible polynomial is the one used : Compute in  GF (28): ( x 4+ x +1) / ( x 7+ x 6+ x 3+ x 2) , where the irreducible polynomial is the one used by AES, P ( x )= x 8+ x 4+ x 3+ x +1.
Draw the diagram for this claw-back provision : Draw the diagram for this claw-back provision and what kind of option is it?

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Implement new forms of computer-mediated technology

How would implementing new forms of computer-mediated technology influence your organization's communication? What is the significane of managers selecting suitable channel for message distribution in Information Age?

  Few techniques to incorporate to site

Did you know that you do not have to start from scratch if your site is not accessible? There are a few techniques you may incorporate to your site.

  Analyze the consequences of experiment done on mice

Group that had been fed had retained this ability, but other group had not. Probable reason that scientists used only mice from same pure-bred strain is so that?

  Explaining open-source software products like linux

Intellectual property as well as increase its support of open-source software products like Linux be a successful growth strategy in the "brutally competitive marketplace" in which it operates? Why or why not?

  How procedure calls go before registers saved in memory

How deep can the procedure calls go before registers must be saved in memory? (That is, what is the maximum number of "active'' procedure calls that can be made before we need to save any registers in memory?)

  Cores on computer systems

Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency,

  Write advantages of group work on project

When working in group are you generally a leader, a follower, a slacker or some other role? Describe. Write down two advantages of group work and two disadvantages of working on project in group?

  First two training iterations of backpropagation algorithm

Consider a two-layer feedforward ANN with two inputs a and b, one hidden unit c, and one output unit d. This network has five weights (w,, web, wd, wdc, wdO), where w,o represents threshold weight for unit x

  Why computer literacy has become fourth fundamental skill

Explain whether today, computer literacy (knowledge of how to properly use computer and its software applications) has become fourth basic skill.

  Creating an oracle

The clique problem itself is NP-hard. Thus you may not wish to have an oracle that runs in exponential time. Consider approach to approximate the solution.

  Create direct-mapped data cache for the byte offset

Create the 128KB direct-mapped data cache which uses a 32 bit address and 16 bytes per block. Compute the following: How many bits are utilized for the byte offset?

  Categorize the point-of-sale system in supermarket

Categorize the following systems and explain your classification: A point-of-sale system in a supermarket, A system which sends out reminders that magazine subscriptions are due to be paid.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd