# S07

#1

Create a Flowgorithm program as follows:

Enter the required comment lines for Author, Date and Description.

Declare Integer variables for number of tickets ordered, and the maximum number of tickets available in Section A, Section B, and Section C. Assign values for the maximum tickets in each section. Declare Real variables for the cost of tickets in Sections A, B and C, and assign values for those costs. Declare a Real variable for the total sales, and initialize it to 0.

Ask the user for the number of tickets sold in Section A, and use a validation loop that iterates if the number entered is less than 0, OR greater than the maximum available for Section A. (You can use the word OR, or two vertical bars || ). Inside the loop, display an error message telling the user to enter a number between 0 and the maximum for that section, then prompting them again. (You can copy and paste the Output prompt and Input shapes just above the loop.)

On the False branch of the loop, multiply the number of tickets ordered by the cost of tickets for that section, and add that amount to the total sales.

Repeat steps c and d for Sections B and C. You can use Copy and Paste for your loops and calculations, but be sure to edit references from Section A to apply to Sections B and C.

Save the file as S07.fprg.

Run the program. The program should ask you to enter the number of tickets sold in Sections A, B and C. If any number is less than 0, or higher than the maximum number of tickets for that section, an error message is displayed until a valid number is entered. The program then displays the total amount of income from tickets sales. If there are any errors, recheck the instructions and correct them, then resave the file.

#2

Oakwood Community College Registration

Oakwood Community College has a student registration process similar to the one at your school. The administration asked you, as IT director, to develop a new system that would be more user-friendly. Your first task is to create an object-oriented model of the current system. You can use your school's registration process as the basis for the model.