TCO 2—Given a simple problem, design a solution algorithm that uses arithmetic expressions and built-in functions.
Assignment
Your goal is to solve the following simple programming exercise. You have been contracted by a local stadium to design an algorithm determining the total seating charges for any game held at the stadium. Lower level seats cost $25 per seat, midlevel seats cost $15 per seat, and upper level seats cost $10 per seat. The algorithm should ask the user for the number of seats being purchased in each seating level. Then, the algorithm will determine the total for each level and a grand total for the entire purchase.
Be sure about the logic and design first (IPO chart, flowchart, and pseudocode).
Advanced (optional): Use constants for the per-seat cost for each level.
Rubric
Complete the steps and submit the completed file to the Dropbox.
1) Variable list
2) IPO chart
3) Flowchart
4) Pseudocode
5) Desk-check
Game Seating Charges
Document
Points possible
Points received
Variable list
4
IPO chart
4
Flowchart
4
Pseudocode
4
Desk-check
4
Total Points
20
1) Variable List
List all the variables you will use (use valid variable names). Indicate whether the data type is string, integer, or double, and so on.
lowerLevel<25 (real) Midlevel <15 (Real) Upper_level<10 (real) totalAmount (double) totalNumber_seats (real)
2) IPO Chart
List the inputs, any processes/calculations, and the outputs. Use the same valid variable names you used in Step 1.
Inputs
Process (calculations)
Outputs
Lower_level<25
Midlevel<15
Upper_level<10
Number_of_seats
Calculate ticket price by level
Calculate number of seats purchased
Total amount purchased
Total number of sets purchased
3)
4) Flowchart
5) Use MS Visio to create a flowchart. Paste the flowchart here or attach it as a separate document. Use the same valid variable names you used in Step 1.
6)
7) Pseudocode
8) Describe your