Make sure each program has at least one method in addition to its driver method(main). Or use one driver main method and write method(s) for each of the program. It is a single program not two...


Make sure each program has at least one method in addition to its driver

method(main). Or use one driver main method and write method(s) for each

of the program.




It is a single program not two individual questions so please write both.


Write a java program to compute each of the following, use a separate method for each.



(i) Calculate the energy of a flight traveling at the speed of light, use e = mc2
take c as the

speed (3*108), e = energy and m is mass of the flight. Prompt the user to enter the

mass.



(ii) Calculate the size of the gravitational force acting between you and your friend as you

approach each other (center-to-center 1 meter apart) in the hall way. Use the formula

below. Prompt the user to supply the values of M and m.





? = (?∗?∗m)/d2





M = Mass of your friend

m = Your mass

d = center-to-center distance 1m

G = 6.67 * 10
-11



Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here