How do you write a Method (using Java) that calculates your weight on the moon.The main program needs to prompt the user for a weight and pass that to the MoonWeight Method (fexample variable name â?" Iâ??m just using). Then with the moon weight it will divide by 6 and return that value to the main program. The main program will then print out the initial (earth weight) and then the moon weight.
I looked at this youtube video(below) but still confused.