Write Java Program Convert Power Kilowatts Kw Electric Car Motor Horsepower Hp Follows Pro Q43780834
Write a Java program to convert power in kilowatts (kW) of anelectric car motor to horsepower (hp) as follows:
Prompt the user to enter the power in kilowatts (kW) of theelectric car motor.
Convert the power to horsepower. In a comment, reference yoursource for the conversion factor (non-wiki source). (As a roughestimate, 1 hp equals ~0.75 kW.)
Output the power in horsepower (hp). Print the result with 2decimal places.
Once this is working, add a do-while loop such that, after thepower is displayed, the user sees:
“Repeat the calculation (Y/N)?: ”
If the user enters the character ‘Y’ or ‘y’, then repeat theprocess of requesting new user input, calculating and displayingthe converted power. If the user enters any other character, thenquit.
Expert Answer
Answer to Write a Java program to convert power in kilowatts (kW) of an electric car motor to horsepower (hp) as follows: Prompt t…
OR