Keep a record of the total attendance and the total cash


You will become acquainted declaring and using variables in simple Visual Basic Windows applications. In addition to that, in this lab you will write simple if/else statements.

Modify the Gate Takings Application

1. Scenario:

Your application from Activity was able to keep a record of the total attendance and the total cash collected from ticket sales from all events happening at the Games.

In this lab, in order to ease the work you do, we will assume that there are only three events involved in the Games. The events or sports are tennis, golf and swimming.

2. What to do:

a. Modify your program so that now it does the following:

1. In addition to keeping track of total attendance and total cash collected, your application should also display:

- Average attendance at each event
- Average gate-takings at each event.

2. Each event has a different ticket price. For example Tennis = $10, Golf = $15, Swimming =$5..

[Hint: You will have to declare 3 constants to store the ticket prices. In Lab you had just one constant. Then use a conditional if/else statement in the click-event procedure of your ‘Calculate' button to correctly compute the total and average gate-takings for a particular event].

b. Make the following changes to your application's interface.

1. Add a label object to display the average attendance.

2. Add a label to display the average gate-takings.

[Hint: Write code under the click-event procedure of the ‘Display Totals' button to display the figures for the average]

3.

i. Make sure that you have completed Lab Activity (Gate Takings Application) and understand well how that program works.

ii. Design the form for the main Activity. You should draw a sketch of the user interface and all the controls on the form.

iii. Think of the variables and their type that you are going to use.

iv. Also in your prep-work, write the code that would go in the click-event handler for the ‘Calculate' button.

Implement the application designed using Microsoft Visual Basic.

Request for Solution File

Ask an Expert for Answer!!
Visual Basic Programming: Keep a record of the total attendance and the total cash
Reference No:- TGS01002039

Expected delivery within 24 Hours