Freely Falling Bodies 5 points Let’s Go

Freely Falling Bodies 5 points Let’s Go! A free fall is when an object is falling freely with no forces acting upon it except gravity, which is a defined constant called g = 9.8 m/s^2. The distance the object falls (height in meters) is 1/2 gravity times the square of the time falling. Velocity (meters per second) is defined as gravity * time. The formulas are given below. Remember, you can get t^2 by multiplying t * t. h = 0.5 * g * t^2 v = g * t Use g as a final variable to solve the following problems in Java. You’re standing at the edge of a cliff and drop a ball. It takes 10 sec to hit the ground. How high up are you? In other words, what’s the height of the cliff? What is the velocity of the ball when it hits the ground? Print the height and then the velocity. Format your answers so that the numbers have units and meaning in a sentence. Once you get your program working properly, try to reset the final g variable and the t variable to something different before you do the calculations in the formulas in your program. What happens in each case?

The Correct Answer and Explanation is:

The ball strikes the ground 490 m below the cliff top, and at that instant it is moving 98 m/s downward.


Explanation
In free-fall problems the only force acting is gravity, so we can use the constant acceleration formulas derived from Newton’s second law. Earth’s gravitational field near the surface produces an acceleration g = 9.8 m/s². Starting from rest (initial velocity = 0), the distance hh an object travels in time tt is given by h=12gt2.h=\tfrac12 g t^{2}.

Here t=10  st = 10\;\text{s}, so h=12(9.8  m/s2)(10  s)2=0.5×9.8×100=490  m.h=\tfrac12 (9.8\;\text{m/s}^2)(10\;\text{s})^{2} =0.5 \times 9.8 \times 100 = 490\;\text{m}.

The sign convention is flexible—many textbooks treat downward as positive to avoid negatives—but the magnitude is 490 m, meaning the cliff is that high above the impact point.

Velocity after uniformly accelerated motion is v=gt.v = g t.

Substituting the same time gives v=9.8  m/s2×10  s=98  m/s.v = 9.8\;\text{m/s}^2 \times 10\;\text{s}=98\;\text{m/s}.

Because the object is moving toward Earth, the direction is downward; in Java you might include a minus sign if up is defined as positive.


Why declare g as final?
In Java, prefixing a variable with the keyword final turns it into a constant: it can be assigned only once. Using

final double G = 9.8;

prevents accidental reassignment later in the code, which is important because gravity is a physical constant for all objects in the scenario. If you later write G = 1.62; (the Moon’s gravity) the compiler halts with an “cannot assign a value to final variable” error, safeguarding the correctness of every formula that depends on G.

The time variable t, on the other hand, is ordinarily just a regular double. Reassigning it before you evaluate h and v simply plugs a different number into both equations. For example, if you set t = 5; right before the calculations, the compiler is happy, and the program prints 122.5 m for the height and 49 m/s for the velocity—values appropriate for five seconds of fall.

Thus: making g final enforces physical realism, while keeping t mutable lets you explore how changing the fall duration influences distance and speed.

Scroll to Top