Temperature Getters and Setters
Geoffrey Challen // 2020.9.0
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.