Even to the moon!

  • 1
  • unavailable
Programmers often move from place to place, but only if they want to. That's why they love converters so much. Well, maybe that's not why. Still, we will practice writing them. Now imagine that you have to work at a particular location: the Moon. Let's implement a method that converts your Earth weight to your lunar weight.
You can't complete this task, because you're not signed in.
  • Popular
  • New
  • Old
You must be signed in to leave a comment
DusernajderLevel 20 , Budapest
14 April, 19:23
So you already taught us how to use static variables, but if I try to use it in the task it thorws me an error, I think it would be better than magic numbers. I've tried to use this: public static final double LUNAR_GRAVITY = 0.17;
20 September, 14:32
the static is already provided in the exercise
DusernajderLevel 20 , Budapest
22 September, 11:55
What do you mean? I can not see any static variable declared in the source. I just mentioned that it would be more convenient to use a final declaration.
Bryce LindleyLevel 7 , San Clemente
19 January, 22:53
Please excuse my dear aunt sally
devikaLevel 4 , Hyderabad
29 December 2018, 06:24
oh god!i felt some difficulty but finally did it.