Question: Basics and Control Statements. Need java code(with Detailed comment ), and run completely. The program should request information from the user in the following format.


Basics and Control Statements.
Need java code(with Detailed comment), and run completely.
The program should request information from the user in the following format.
The Safe Keeping Parking Garage determines the price it charges for parking based on the day of the week and the time spent parked. To avoid bleeding its customers dry, the garage has maximum fees it will charge. Here are the rules the company uses to calculate its prices: Rate for 15 Minutes or Maximum Fee Day of Week Portion Thereof Charged Monday - Frida Saturday & Sunda 1.25 0.50 15.00 15.00 To help you understand the business process, the garage manager created the following examples to illustrate some parking situations Charge MaxCharge Vehicle VehicleArrival D ArrivesLeaves 15 Minute Rate Based on epart Duration ate Charge Cctual 11.25 25 22.5 Day Week Minutes Minutes in Minutes M-F 745 700 1130 1305 1420 750 1730 1755 1400 1000 1200 1600 1500 1500 1715 1900 1905 1920 1425 465 420 690 785 860 470 1050 1075 840 580 135 1.25 1.25 1.25 1.25 1.25 1.25 1.25 1.25 0.5 11.25 M-F M-F M-F 120 960 900 270 3.75 3.75 1035 1140 1145 1160 865 565 38 47.5 M-F S & S S& S 5 6.25 6.25 285 Notice that the arrival in minutes is the number of hours in the arrival time multiplied by 60 plus the number of minutes. For instance, in the first row the "Arrival Minutes" is calculated as 7 hours times 60 giving 420 plus 45 minutes resulting in a total of 465 minutes. Likewise, the "Depart Minutes" is calculated as 10 hours times 60 giving 600 minutes plus 0 minutes resulting in total of 600 minutes. How might you use integer division and modulus operations to separate hours and minutes from an int? The table above represents time in a 24 hour format using integers. This makes calculating duration much easier. As anyone who has used a parking garage knows, the number of 15 minute intervals counts even a minute over as a new interval. For instance, a duration of 60 minutes produces 4 15 minute intervals, and a duration of 61 minutes produces 5 intervals In the sixth row above, a duration of 565 minutes is 38 15 minute intervals- 37 full intervals plus 10 minutes of the next one
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
