Question: Would anyone please help me with this question in ( Java)!!! ? Questions You've been hired by a taxi company to write a program that
Questions You've been hired by a taxi company to write a program that receives reports from its drivers at the end of the day where they provide, for each ride, the amount of the fare (in $) and the number of customers for that ride. You will know the last ride has been entered for a given driver if the last fare is negative (of course, the fare amount is the absolute value of that amount, but the last driver knows to enter it in as a negative number). You will know the last driver has entered their information if the last fare is negative and the last number of customers for that ride is negative. To help the drivers know the previous driver is done entering in their report, the program should say, "Serving Driver 1, "Serving Driver 2," and so on, as appropriate. You can assume there will be at least one driver submitting a report and that each driver had at least one ride. Your program should provide a report of (1) how many rides occurred during the day, and (2) what was the total gross receipts from all your drivers, (3) what was the average fare for a ride, and (4) the total number of customers served during the day Here is some sample output Serving Driver 1 Enter fare amount for a ride: 2.0 Enter number customers for a ride: 3 Enter fare amount for a ride: 2.5 Enter number customers for a ride: 2 Serving Driver 2 Enter fare amount for a ride: -1.5 Enter number customers for a ride: -1 Total rides: 3 Total gross receipts: $6.0 Average fare for a ride: $2.0 Total number customers:6
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
