Question: Write a Java program that simulates a rollercoaster ride ticketing system. The program should: Ask the user for their height in centimeters. ( If statement

Write a Java program that simulates a rollercoaster ride ticketing system. The program should:
Ask the user for their height in centimeters. (If statement)
If the user is 120 cm or taller, they can ride the rollercoaster. The program should then ask for their age and determine the ticket price based on the following conditions:
Under 12: $5(if statement)Between 12 and 17: $7(else if statement)45 to 55: Free ticket (else if statement)18 and above: $12 else
Ask the user if they want a photo taken, which adds $3 to the total bill.
use this for this portion: char character = input.charAt(0);
Display the total bill at the end.
If the user is shorter than 120 cm, display a message saying they cannot ride the rollercoaster.
If you all have any questions, please let me know. Please do not try to use AI.It will notify me and I will have to give you a grade of 0.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!