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.
Stuck? You may find these lessons helpful: