MHB Gravity Calculation: Calculate Accel Gravity

AI Thread Summary
The discussion focuses on calculating gravitational acceleration using Newton's laws. The gravitational constant (G) and the mass of the Earth (M) are provided, along with the distance from the Earth's center (distCenter). The relevant equations are outlined: Newton's second law (a = F/m) and the universal law of gravitation (F = G(Mm/r^2)). The derived formula for acceleration due to gravity (a = G(M/r^2)) is emphasized as the basis for implementing the calculation in the provided Java code. The goal is to compute and print the gravitational acceleration (accelGravity) using these principles. Participants are encouraged to wrap their code in appropriate tags for better readability.
dcs1953
Messages
3
Reaction score
0
Code:
public class GravityCalculation {
   public static void main (String [] args) {
      double G            = 6.673e-11;
      double M            = 5.98e24;
      double accelGravity = 0.0;
      double distCenter   = 0.0;

      distCenter = 6.38e6;

      /* Your solution goes here  */

      System.out.println("accelGravity: " + accelGravity);
      return;
   }
}
 
Last edited by a moderator:
Technology news on Phys.org
Please wrap your code in [CODE][/CODE] tags...it will preserve the whitespace and make your code easier to read.

One form of Newton's second Law of Motion is:

$$a=\frac{F}{m}$$

where $a$ is acceleration, $F$is the applied force, and $m$ is the mass of the object in motion.

And, Newton's Universal Law of Gravitation states:

$$F=G\frac{Mm}{r^2}$$

Where $F$ is the resulting force, $G$ is the gravitational constant, $M$ and $m$ are the masses of the two objects attracting one another, and $r$ is the distance separating their centers of mass. And so, we find the resulting acceleration of the object having mass $m$ to be:

$$a=\frac{F}{m}=\frac{G\dfrac{Mm}{r^2}}{m}=G\frac{M}{r^2}$$

Can you now use this to construct the needed statement?
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top