Question: System.out.println ( = = = = 3 = = = = ) ;System.out.println ( = = = = 4 = = =
System.out.println;System.out.println;accountchangeLocationWari;accountridingHistory;accountridingHistory;accountbookRideBanani ;System.out.println;accountbookRideGulshan ;System.out.printInYou have
accountremainingRides rides remaining.";Jonas Kahnwald, you have visited
Merul Badda, Wari this month.
Martha Nielsen, you haven't visited
anywhere this month.
Jonas Kahnwald has booked a ride!
Destination: Banani
Fare: Taka
Jonas Kahnwald, please update your
plan to premium or wait till next
month!
Jonas Kahnwald has booked a ride!
Destination: Gulshan
Fare: Taka
Jonas Kahnwald, you have visited
Gulshan this month.
You have rides remaining.You are building a ride booking app called UberApp. Using this app, a customer can book rides.
BookRideLocation Distance method books rides for a user and prints the fare for that ride based on the distance. After booking the ride, fare will be calculated as below:
Fare distance
A person can change the location of their last booked ride using changeLocationLocation Distance method. The new fare is calculated as;
Fare distance of new Fare. ig If new Fare then the total fare after changing location will be
The UberApp keeps track of all the locations visited by the user in an array of String.
The resetMonth method resets the location visited in a month as well as the number of remaining rides of that month.
Design the UberApp class that will produce the following output.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
