Define a class
named Temperature
with two properties: a Double
called temperature
and a String
called place
.
Provide a complete constructor that sets both properties with temperature
as its first parameter.
place
should be publicly readable but not writeable, while temperature
is both publicly readable and writeable.
You're challenge is to write tests for this problem described above.
Stuck? You may find these lessons helpful: