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

  Receiver r is conducting an auction

Assume the receiver R is conducting an auction in which two bidders each encrypt their bids using the scheme above and send them to R.

  Ways to avoid communication pitfalls

Based on the section on "Watch out for communication pitfalls" in the Bateman and Snell text, describe some ways that Lei could have avoided this situation.

  Classify occurrences as an incident or disaster

Classify each of the following occurrences as an incident or disaster. If an occurrence is a disaster, determine whether or not business continuity plans would be called into play.

  The arrangement of a group of variables along a grid

a two-dimensional array is nothing more than the arrangement of a group of variables along a grid. Each variable occupies a specific row and column

  Explain what can-t be measured can-t be effectively managed

According to the following quote "what can't be measured can't be effectively managed." The question is can everything that is important in network security be measured using metrics or any other process? Why or Why not?

  Determining contents of memory of specified address

Find the contents of memory from address 0x1800 up to, but not including, 0x1809, after this code is executed.

  Find crc using modulo two arithmetic or polynomials

For a pattern P = 10011, and a message D = 10010011011, find, using modulo 2 arithmetic or polynomials, the CRC, then the string T to be transmitted.

  Explain use of gross domestic product-measure business cycle

Explain the use of Gross Domestic Product (GDP) to measure business cycle. Explain the roles of government bodies which determine national fiscal policies.

  The progresses report

The progresses report is a chance to highlight and discuss any issues that you are having in meeting the project plans. Discuss any changes to the original proposal and if needed propose a renegotiate plan on what is to be achieved for the project in..

  Security by implementing database auditing

You are a DBA for corporation's databases. The management has decided to increase security by applying database auditing yet they are unspecific what actions to audit.

  Explaining major provisions of telecommunications act

Write down some of the major provisions of the Telecommunications Act of 1996?

  How will decision meet accessibility guidelines

Knowing that this violates Redundancy Principle, but wanting to accommodate employees with disabilities, what would you suggest instead? How would your decision meet accessibility guidelines?

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