Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The average person can jump off the ground with a velocity of 7 mph without fear

ID: 3927024 • Letter: T

Question

The average person can jump off the ground with a velocity of 7 mph without fear of leaving the planet. However, if an astronaut jumps with this velocity while standing on Halley's Comet, will the astronaut ever come back down? Create a Java program that allows the user to input a launch velocity (in mph) from the surface of a small body and determine whether the jumper will return to the surface. If not, your program should calculate how much more massive the body must be in order to return the jumper to the surface. Use a while loop to implement the last part of the program. Hold the radius of the body constant and increase the body's mass while the escape velocity is still below 7 mph. v-escape = Squareroot 2 GM/R G = 6.67 times 10^-11 Nm^2/kg^2 Gravitational Constant M = 1.3 times 10^22 kg mass of Haley's Comet R = 1.153 times 10^6 m radius of Haley's Comet

Explanation / Answer

Code:

package escapevelocity;

import java.util.Scanner;

public class EscapeVelocity {

public static void main(String[] args) {
double velocity;
System.out.println("Enter the velocity");
Scanner s=new Scanner(System.in);
velocity=s.nextDouble();
double esc_velocity;
double G= 6.6726 * (Math.pow(10,-11));
double M=1.3*(Math.pow(10,22));
double R=1.153*(Math.pow(10,6));
esc_velocity=Math.sqrt((2*G*M)/R);
System.out.println(esc_velocity);
if(velocity<esc_velocity)
System.out.println("Return to the surface");
else
System.out.println("Will not return to the surface");
while(esc_velocity<7)
{
M=M+(1*(Math.pow(10,22)));
esc_velocity=Math.sqrt((2*G*M)/R);
}
  
}
  
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote