Question: code in java Write a program that would return flight ticket price based on base price, class, and age. Users can book tickets only for

code in java

code in java Write a program that would return flight ticket price

Write a program that would return flight ticket price based on base price, class, and age. Users can book tickets only for three routes. LAX to Texas LAX to Boston LAX to Chicago The base price for the three routes are, LAX to Texas: 500 LAX to Boston: 600 LAX to Chicago: 400 Get the source location, destination location, age and class from the user. if the class is Economy: ClassValue=1 if the class is FirstClass: Class Value=2 if the class is Business: ClassValue=3 if age 5 and 60 Price = 10 % discount on the base price (Class doesn't matter for age>60) Display the final ticket Price to the user. Example 1: Enter the source and destination Location: LAX to|Texas Enter your age: 20 Enter your class: Economy Your final ticket Price is: 750

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!