Hello I need help for this home work by using JAVA language

Hello I need help for this home work by using JAVA language:

You have been assigned as the lead programmer for the World Track and Field Championships! The 100 meter dash is one of the highlights of this competition and is considered by many to demonstrate the world’s fastest human. Your job is to take the top finish time (given in seconds with two digits of precision to the right of the decimal point) for the 100 meter dash and do some conversions to find out how fast the person was traveling in:

· meters per second

· feet per second

· kilometers per hour

· miles per hour

In addition, you must also determine how long it would take the person to run one mile. And finally, you must determine how long it would take the person to run 100 yards.

Your program design should make use of java methods to properly encapsulate variables and processing.

The result of each conversion you perform should be displayed and clearly labeled, as demonstrated in the sample “run” below (NOTE: the actual numeric results are not displayed – that is for you to figure out):

Example run:

Please enter the winning time of the race: 15.00

The person was traveling at a rate of:

x.xx meters per second,

y.yy feet per second,

z.zz kilometers per hour,

y.yy miles per hour,

It would take m minutes and n.nn seconds for the person to run one mile.

It would take t.tt seconds for the person to run 100 yards. Programming Principles I 1/7/2015

It is your job to figure out the conversions necessary to determine the necessary output based on the above (NOTE: it is also your job to format your output in the same style as shown).

Your solution must be designed modularly.

A zip file containing:

_Your java code - class is named Track.java.

_A text file showing three sample runs (capture you output in the jGrasp console window -right-click).

Solution

Zip cannot be uploaded.
Please find the below code and output.txt file:

   package org.learning.chegg;

  

   import java.io.BufferedReader;

   import java.io.IOException;

   import java.io.InputStreamReader;

  

   public class Track {

      

      

       public static double getSpeedInMetresPerSecond(double distance, double timeInSecond){

           double speed = distance/timeInSecond;

           //Rounding off to two decimal places

           return Math.round((speed*100))/100.0d;

       }

      

       public static double getSpeedInFeetPerSecod(double distanceInMetres, double timeInSecond){

           double speed = (distanceInMetres * 3.2808399)/timeInSecond;

           //Rounding off to two decimal places

           return Math.round((speed*100))/100.0d;

       }

      

       public static double getSpeedInKilometersPerHour(double distanceInMetres, double timeInSecond){

           double speed = (distanceInMetres * 1000)/(timeInSecond * 3600);

           //Rounding off to two decimal places

           return Math.round((speed*100))/100.0d;

       }

      

       public static double getSpeedInMilesPerHour(double distanceInMetres, double timeInSecond){

           double speed = (distanceInMetres * 1609.344)/(timeInSecond * 3600);

           //Rounding off to two decimal places

           return Math.round((speed*100))/100.0d;

       }

      

       public static void main(String[] args) throws NumberFormatException, IOException {

           BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));

          

           System.out.print(\"Please enter the winning time of the race:\");

          

           Double winningTime = Double.parseDouble(bufferedReader.readLine());

          

           System.out.println();

          

           System.out.println(\"The person was traveling at a rate of:\");

          

           System.out.println(getSpeedInMetresPerSecond(100, winningTime)+\" meters per second,\");

           System.out.println(getSpeedInFeetPerSecod(100, winningTime)+\" feet per second,\");

           System.out.println(getSpeedInKilometersPerHour(100, winningTime)+\" kilometers per hour,\");

           System.out.println(getSpeedInMilesPerHour(100, winningTime)+\" miles per hour,\");

          

           double distanceInMeters = 1609.344;

           double time = distanceInMeters / getSpeedInMetresPerSecond(100, winningTime);

          

           int timeMins = (int)Math.round((time / 60)) ;

           double timeSecs = Math.round((time % 60) * 100) / 100d;

          

           System.out.println(\"It would take \"+timeMins+\" minutes and \"+timeSecs+\" seconds for the person to run one mile.\");

          

           distanceInMeters = 100*0.9144;

           time = distanceInMeters / getSpeedInMetresPerSecond(100, winningTime);

           time = Math.round(time*100)/100d;

           System.out.println(\"It would take \"+time+\" seconds for the person to run 100 yards\");

       }

   }


----jGRASP exec: javac -g Track.java

----jGRASP: operation complete.

----jGRASP exec: java Track
Please enter the winning time of the race:12

The person was traveling at a rate of:
8.33 meters per second,
27.34 feet per second,
2.31 kilometers per hour,
3.73 miles per hour,
It would take 3 minutes and 13.2 seconds for the person to run one mile.
It would take 10.98 seconds for the person to run 100 yards

----jGRASP: operation complete.

----jGRASP exec: java Track
Please enter the winning time of the race:15.0

The person was traveling at a rate of:
6.67 meters per second,
21.87 feet per second,
1.85 kilometers per hour,
2.98 miles per hour,
It would take 4 minutes and 1.28 seconds for the person to run one mile.
It would take 13.71 seconds for the person to run 100 yards

----jGRASP: operation complete.

----jGRASP exec: java Track
Please enter the winning time of the race:12.34

The person was traveling at a rate of:
8.1 meters per second,
26.59 feet per second,
2.25 kilometers per hour,
3.62 miles per hour,
It would take 3 minutes and 18.68 seconds for the person to run one mile.
It would take 11.29 seconds for the person to run 100 yards

----jGRASP: operation complete.

----jGRASP exec: java Track
Please enter the winning time of the race:9.56

The person was traveling at a rate of:
10.46 meters per second,
34.32 feet per second,
2.91 kilometers per hour,
4.68 miles per hour,
It would take 3 minutes and 33.86 seconds for the person to run one mile.
It would take 8.74 seconds for the person to run 100 yards

----jGRASP: operation complete.

Hello I need help for this home work by using JAVA language: You have been assigned as the lead programmer for the World Track and Field Championships! The 100
Hello I need help for this home work by using JAVA language: You have been assigned as the lead programmer for the World Track and Field Championships! The 100
Hello I need help for this home work by using JAVA language: You have been assigned as the lead programmer for the World Track and Field Championships! The 100
Hello I need help for this home work by using JAVA language: You have been assigned as the lead programmer for the World Track and Field Championships! The 100

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site