I need some help writing a program. My professor is the worst at explaining how to do these, and expects us know how to do this in a beginner
java course
Write a Java application that prompts for the distance to be traveled in kilometers (you
will need to convert this to meters). Then, determine the number of burns required to
reach the destination within 35 meters. Output the burn number, how far the probe
traveled for the burn, and the remaining distance to reach its destination. You must use
a While loop in your script.
this is what the output should look like
Enter the distance to be traveled in kilometers:
50
Burn 1: Traveled 30000 meters
20000 meters to go
Burn 2: Traveled 12000 meters
8000 meters to go
Burn 3: Traveled 4800 meters
3200 meters to go
Burn 4: Traveled 1920 meters
1280 meters to go
Burn 5: Traveled 768 meters
512 meters to go
Burn 6: Traveled 307.2 meters
204.8 meters to go
Burn 7: Traveled 122.88 meters
81.92 meters to go
Burn 8: Traveled 49.152 meters
32.768 meters to go
You made it to Jupiter in 8 burns
additional info
determine the actual number of burns required for your spacecraft to travel from
Earth to Jupiter. Note that the average distance from Earth to Jupiter is 778412028 million km.
1. The Burn and distance traveled and the “meters to go” should appear on two
lines as shown in the sample output. Note that this print should be done within
the while loop.
2. “meters to go” on the second line of the burn information should be lined up with
“Traveled x meters” as shown in the Sample Output. To do this,
you should use
the tab escape sequence, \t
3. For the distances, use a DecimalFormat object that prints only to three decimal
places.
Thanks for any feedback.