Question: I need help on how to use the if and switch statements. Please adhere to the Standards for Programming Assignments and the Java Code and

I need help on how to use the if and switch statements.  I need help on how to use the if and switch

Please adhere to the Standards for Programming Assignments and the Java Code and Style Guidelines. Submit the following .List of source code with comments to document Test output listed as comments at the end of your program 1. CinemaPrice (10 pts). Design and implement an application called CinemaPrice to determine how much a person pays to go the cinema. The program should generate an age from 1 100 using the Random class and prompt the user for the full ticket price. Then display the appropriate ticket price using the currency format from the NumberFormat class (an example in your book). You may want to refer to the example we did together in class to help you with the "if statement. Decide ticket price on the following basis: 1. 2. 3. 4. under 5, free; aged 5 to 12, half price; aged 13 to 54, full price; aged 55, or over, free. Listed below are several different example outputs. Of course, since the age is being generated randomly, your example will be different. Just include one example. I have highlighted the currency format. (your output will not be highlighted) Please enter the cinema ticket price: 12.50 Your age 1 Your ticket price is $0.00 which is free. Please enter the cinema ticket price: 14.75 Your age 47 Your ticket price is $14.75 which is full price

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 Databases Questions!