Question: 32 I hour= 3600 sel Problem 2 (5 points) Create a class Convert in the file Convert.java. Besides the main() method, write a method called

 32 I hour= 3600 sel Problem 2 (5 points) Create a

32 I hour= 3600 sel Problem 2 (5 points) Create a class Convert in the file Convert.java. Besides the main() method, write a method called english2metricspeed(int miles, double hoursEnroute) that takes 2 parameters: an integer miles and a double hoursEnroute. It should return a double value which represents meters/second. This means, it will have to convert miles to meters and divide by the number of seconds (convert hoursEnroute to seconds for this). Have the english2metricspeed() method call two other methods: double miles2km(int miles) // Returns the number of kilometers given the number of miles (.e 3 miles = 4.8 kilometers) double hours2secs(double hours) // returns the number of seconds given hours (i.. 1.5 hours is 5400 seconds) Have the main() method prompt the user for (miles and for(hours. Then call english2metricspeed() with the miles and hours. Print the result returned by this methad. yse System.out.printf() and limit the number of decimal places to 2. vo eng Example output: Enter miles traveled (integer): 200 320 Km. 320000m Enter hours enroute (double): 2.5 9000 sec Metric speed is: 35.56 meters per second. 2 xogoo

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!