Question: Java programming help 1. Write a program that uses the following static methods to determine the total price of ordering tickets to a local concert.

Java programming help

1. Write a program that uses the following static methods to determine the total price of ordering tickets to a local concert. Adult tickets costs $25 each. Children's tickets costs $20 each.

getAdultQuantity This method should ask the user to enter the number of adult tickets to purchase and then return the value as an int.

getKidQuantity This method should ask the user to enter the number of child tickets to purchase and then return the value as an int.

calculateTicketTotal This method should accept both the quantity of adult and child tickets as arguments. Calculate and return the total for the tickets (a double).

calculateFee This method should accept the ticket total as an argument and return the processing fee (a double). The fee is 7% of the total.

printReceipt This method should accept the quantity of adult tickets, quantity of child tickets, ticket total, and processing fee. It should calculate the grand total and display a receipt which includes quantities, ticket total, fees and grand total.

For example, if the user ordered 3 adult tickets and 2 child tickets, the receipt might look like this:

Box Office

3 adults @ 25 = 75.00

2 children @ 20 = 40.00 Ticket total = $115.00

Processing fee = $8.50

Grand Total = $123.50 Enjoy the show!

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!