Film+Rater

Specification: Film Rater
Write a program which lets users rate a film on a scale of 1 to 5. After each user rating has been entered, the average rating should be displayed. Film ratings are entered by clicking one of five buttons.

**Input Process Output**

 * Inputs:** Film rating (1-5)


 * Process:** Add rating to total, calculate average


 * Outputs:** Average rating

Algorithm
1. add 1 to total rating 2. add 1 to total votes 3. average rating = total rating / total votes 4. display average rating
 * Button 1**

1. add 2 to total rating 2. add 1 to total votes 3. average rating = total rating / total votes 4. display average rating
 * Button 2**

1. add 3 to total rating ...
 * Button 3**

...
 * Button 4**

...
 * Button 5**

The Task
1. Copy and complete the algorithms for buttons 3, 4 and 5 2. The program will require two global variables. Write down the global variables which you will use 3. Write the program

**Hint**
==** To declare a global variable in RealBasic: 1. From the Project Tab, choose Add A Module 2. From the Module tab, choose Add Property 3. In the Declaration field, enter the Global variable name e.g. TotalClicks 4. In the As field, enter the variable type e.g. Integer 5. In the = field, enter the initial value the variable should have e.g. 0 6. Make sure that the global variable button is selected The image below shows how the RealBasic module screen should look when adding a global variable TotalClicks **==