Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Flowchart is not required* King's Island is an amusement park that needs a program for its selling booths Important Suggestion: Before your start, read the

image text in transcribed
Flowchart is not required*
King's Island is an amusement park that needs a program for its selling booths Important Suggestion: Before your start, read the assignment's description in detail and then create a flow chart with your planned program logic. This is a very important step that will save you from making mistakes and spending extra-time in your program. When the logic for your program is clear, write a program in Java for the attendants that will calculate how much to charge visitors of the park based on different conditions. Your program will prompt the user to enter their information, calculate the cost of the ticket based on conditions, and display it on the screen Program conditions: Class should be named "Assignment" There is one ticket base price of $100.00 Senior citizens (age 65) are given a 50% discount over the base price. Children under 4 (less than 4, not less than or equal to) are free. If a customer is from Florida, tickets are $80 (senior citizens still receive a 50% discount over the hase ticket price regardless of their state of residence) Children under 14 from Georgia get an 18% discount over the based price. Senior citizens (age 65) from Texas get an additional 75% discount after their senior citizen discount has been applied Remember that a 7.5% discount can be computed in two ways. You can do amount amount- amount*.075; that is, subtract from amount 7.5% of amount) or amount amount 925, (make amount be 92.5% of its current value) Program must check if age is valid (a valid age is anything > 0), if not, an error message must be displayed Optional: Program must continue executing or give an option to exit Program must accept state names ignoring capital letters (e.g. florida and Florida will be accepted) Output for prices/cost must be formatted using a S sign and two decimals You must use a String to store the visitor's state Remember that to compare Strings, we cannot use == Instead, we use a String method called equals (this is one of the advantages of using object; they provide useful methods). Inputs cannot be hard coded or assignment will not be accepted When program is done, run the final version of your program using the following inputs: State 70 New York New York Georgia Georgia Texas Texas Georgia

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

LO1 Discuss four different views of motivation at work.

Answered: 1 week ago

Question

LO6 Summarize various ways to manage retention.

Answered: 1 week ago