Chapter 3- Data Types and Operators Boolean Expressions Page 2 3 4

Introduction

The If Statement Page 2 3 4 5 6 7 8 9
Arithmetic Operations Page 2 3 4 5 6 Boolean Operators and Nested If Statements Page 2 3 4 5 6 7
Events and Sequential Processing Page 2 3 4 5 More Examples Page 2 3 4 5 6 7 8 9 10 11 12
Datatypes and Conversions Page 2 3 4 5 6 7 Using Check Box and Option Controls Page 2 3 4 5 6 7 8 9 10
Variable Declarations - Local and Global Page 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Exercises Page 2 3 4 5 6 7 8
Chapter 4- Selection Statements Review Questions
Introduction

4-7: Check Box and Option Controls

Exercise 4-6: Global Classics Cinema continued ...

The events for the checkboxes and the minus and plus buttons for the other two ticket types are essentially no different than those for the adult ticket types. You should be able to copy and paste code making minor changes to variable and control object names.

That leaves the implementation of the _Click events of the Next Customer and Exit events to be programmed. We'll only discuss the btnNextCustomer_Click event, there being nothing new for the Exit button event.

The Next Customer button should return the program, i.e. the values of the variables and the interface objects, to the state it was in when first started. I.e.

  1. the ticket quantity variables should all be set to zero,
  2. the adultCost, childCost, and seniorCost variables should be set to zero,
  3. the totalCost variable should be set to zero,
  4. the textboxes for costs should all be set to vbNullString,
  5. the plus, minus and textbox controls for the quantity of tickets should all be made invisible,
  6. the checkbox controls for the ticket types should be disabled,
  7. the groupbox for the movie times should be made invisible and all the radio buttons should be deselected,
  8. the radio buttons for the movie name should all be deselected

You should be able to write this event now.