Assignment No. 6

Formatting and Exception Handling

Theater Revenue

 

A movie theater keeps only a percentage of the revenue earned from ticket sales.  The remainder goes to the movie company.  Create an application that calculates and displays the following figures for one night’s box office business at a theater:

a.    Gross revenue for adult tickets sold.  This is the amount of money taken in for all adult tickets sold.

b.    Net revenue for adult tickets sold.  This is the amount of money from adult ticket sales left over after the payment to the movie company has been deducted.

c.     Gross revenue for child tickets sold.  This is the amount of money taken in for all child tickets sold.

d.    Net revenue for child tickets sold.  This is the amount of money from child ticket sales left over after the payment to the movie company has been deducted.

e.    Total gross revenue. This is the sum of gross revenue for adult and child tickets sold.

f.      Total net revenue.  This is the sum of net revenue for adult and child tickets sold.

The application’s form should resemble the one shown below:


 

Assume the theater keeps 20% or its box office receipts.  Use a named constant in your code to represent this percentage.  Use the following test data to determine if the application is calculating properly:

 

Ticket Sales

 

Price per Adult Ticket:

$6.00

Adult Tickets Sold:

120

Price per Child Ticket:

$4.00

Child Tickets Sold:

72

 

 

Revenue

 

Gross Adult Ticket Sales:

$720.00

Gross Child Ticket Sales:

$288.00

Total Gross Revenue:

$1,008.00

Net Adult Ticket Sales:

$144.00

Net Child Ticket Sales:

$57.60

Total Net Revenue:

$201.60

 

Compress the solution folder that you have created into a Zip file and upload into Canvas.