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

Create a Java program(a project in NetBeans) in which you compute the distance o

ID: 668196 • Letter: C

Question

Create a Java program(a project in NetBeans) in which you compute the distance of an object that will fall under Earth's gravity. The object will fall for 15 seconds while both the starting point and velocity is 0. Use the following equation where x(t)=0.5 * at^2 + vit + xi, where a=acceleration, -9.8 m/s^2    t=time, 15 seconds     vi=initial velocity, 0 and xi=initial position, 0. Afterwards, explain the equation you will be using to compute the distance and write the variables you will need, along with their types and names inside block comments. Lastly, convert your description inside those block comments into JAVA code.

Explanation / Answer

class GravityCalculator {
public static void main(String[] arguments){
double gravity =-9.81; // Earth's gravity in m/s^2
double initialVelocity = 0.0;
double fallingTime = 15.0;
double initialPosition = 0.0;
double finalPosition = 0.0;
System.out.println("The object's position after " + fallingTime +" seconds is "+finalPosition + " m.");
}
}