Question: Question Goal: Write a switch . . . case statement. Assignment: You're programming a system for a theme park. This system categorizes guests based on
Question
Goal: Write a switch case statement.
Assignment: You're programming a system for a theme park. This system categorizes guests based on their age to determine the rides they can access.
Each age group has a specific code and corresponding ride category.
Write some code that reads from the keyboard an int representing the age group. Use a switch statement that prints out the appropriate ride category
from the list below based on the age group:
Age Group Expected Output
If the value is none of the above, print "Unknown Category". Assume also that an int variable needssafetycheck has been declared and assigned. If the age
group is either or increment needssafetycheck by
Note: You are not allowed to use if statements or conditional operators. You will need to write the switch case statement and display the correct output for
each category.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
