File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change
1
+ Your weight on MERCURY is 37.775761520093525
2
+ Your weight on SATURN is 106.60155388115666
3
+ Your weight on VENUS is 90.49990998410455
4
+ Your weight on URANUS is 90.51271993894251
5
+ Your weight on EARTH is 100.0
6
+ Your weight on NEPTUNE is 113.83280724696579
7
+ Your weight on MARS is 37.873718403712886
8
+ Your weight on JUPITER is 253.05575254957407
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ object Test {
18
18
import Planet ._
19
19
assert(enumValueNamed(" SATURN" ) == SATURN )
20
20
assert(enumValue(2 ) == EARTH )
21
- val earthWeight = args( 0 ).toDouble
21
+ val earthWeight = 100
22
22
val mass = earthWeight/ EARTH .surfaceGravity
23
23
for (p <- enumValues)
24
24
println(s " Your weight on $p is ${p.surfaceWeight(mass)}" )
You can’t perform that action at this time.
0 commit comments