Question: PLEASE ANSWER IN JAVA Starts Jan 23, 2023 12:01 AM Ends Feb 8, 2023 11:59 PM Write a program that calculates the weekly revenue that
Starts Jan 23, 2023 12:01 AM Ends Feb 8, 2023 11:59 PM Write a program that calculates the weekly revenue that a tour service makes on tours of downtown Dalton. The organizer of the tours has found that if she sells tickets for $20 each, she can sell 450 tickets per week, but for each $2 she raises the price, 15 less people will buy tickets. Based on this observation, the weekly revenue would be given by the formula Weekly Revenue =7.5p2+600p where p is the price per ticket. The program should declare two variables: - a variable of type int named price - a variable of type double named revenue The program should prompt the user to enter a price per ticket as a whole number. The program should store the value entered by the user in the price variable. The program should use the formula above to calculate the value of the revenue variable based on the value of the price variable and display the results to the user. Use System.out.printf() or String.format() to display the output to the user. Use System.out.printf( ) or String.format() to display the currency value rounded to two decimal places and using the comma as a thousands separator. Two sample runs of the program would look like this: Sample Run 1: Enter the price per ticket as a whole number. daltonstate.view.usg.edu
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
