Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

There are three seating categories at an athletic stadium. For a baseball game,

ID: 3650117 • Letter: T

Question

There are three seating categories at an athletic stadium. For a baseball game, Class A seats cost $15 each, Class B seats cost $12 each, and Class C seats cost $9 each. Create an application that allows the user to enter the number of tickets sold for each class. The application should be able to display the amount of income generated from each class of ticket sales and the total revenue generated. I need to see this done in Visual Basic 2010 express. Really lost so any help would be appreciated with the code. If you could also give some explanation it would be appreciated.

Use the following test data to determine if the application is calculating properly:

Ticket Sales Revenue
Class A: 320 Class A: $4800.00
Class B: 570 Class B: $6840.00
Class C: 890 Class C: $8010.00
Total Revenue: $19650.00
Class A: 500 Class A: $7500.00
Class B: 750 Class B: $9000.00
Class C: 1200 Class C: $10800.00
Total Revenue: $27300.00
Class A: 100 Class A: $1500.00
Class B: 300 Class B: $3600.00
Class C: 500 Class C: $4500.00
Total Revenue: $9600.00

Explanation / Answer

Module Module1

Sub Main()

Dim a As Integer

Dim b As Integer

Dim c As Integer

Dim total As Integer

Console.WriteLine("Ticket Sales Revenue: ")

Console.Write("Class A: ")

'calculating class A revenue by multiplying class A seats with 15

a = CInt(Console.ReadLine()) * 15

Console.WriteLine("Class A: ${0}", a) 'displaying class A renvenue

Console.Write("Class B: ")

'calculating class B revenue by multiplying class B seats with 12

b = CInt(Console.ReadLine()) * 12

Console.WriteLine("Class B: ${0}", b) 'displaying class B renvenue

Console.Write("Class C: ")

'calculating class C revenue by multiplying class C seats with 9

c = CInt(Console.ReadLine()) * 9

Console.WriteLine("Class C: ${0}", c) 'displaying class C renvenue

total = a + b + c ' adding a,b,c to obtain total revenue

Console.WriteLine("Total Revenue: ${0}", total) 'displaying total revenue

End Sub

End Module