Question: java Objective: Write a class eBi ke that accomplishes the following: - Ask the user to enter a bike manufacturer - Ask the user to
Objective: Write a class eBi ke that accomplishes the following: - Ask the user to enter a bike manufacturer - Ask the user to enter the battery capacity of the bike - Ask the user to enter the weight of the bike - Ask the user to enter the average number of miles the bike (maxRange) can do with a full charge maxRange is (also) a function of the speed, but in this exercise, we assume that maxRange is only a linear function of the battery charge. - Ask the user to enter a "safety factor*" greater than 1 (i.e. 1.3) - Ask the user to enter the average speed the user likes to bike Assuming the battery is 50% charged, calculate the maximum distance reachable. Given the average speed of the user, calculate the time of the journey giving hours, minutes and seconds. At the end of the program, a summary printout returns something like this: Given my bike: Bianchi that weight: 5.5kg, with a 508 charge, expect to run: 50miles. The time of my journey is: 6h35min and 10s. The above example is a sample (use all the gathered inputs to adjust the above printout accordingly and make the program parametric, so that it will work for different inputs) *the safety factor takes into account that maxRange is not really only function of the battery charge (+ other approximations...) Jse the safety factor to scale down (linearly) the theoretical calculated mileage
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
