Define a public
class named Temperature
with two instance variables: a double
called temperature
and a String
called place
.
Provide a complete constructor that sets both fields with temperature
as its first parameter.
Provide a getter and setter for temperature
, and only a getter for place
.
Your getters and setters should follow our naming convention: get
or set
followed by the name of the field,
capitalized.
Stuck? You may find these lessons helpful: