In this exercise, you will create a data type class called "Temperatures" which contains two
instance fields of type int to store a high temperature and a low temperature.
The Temperatures class should have two accessors: getHighTemp and getLowTemp,
two mutators: setHighTemp and setLowTemp, a printTemperatures method, an equals method,
and two constructors: one with parameters and one without. The printTemperatures method
should neatly print, with suitable labels, the high and low temperatures in the object which is its
implicit parameter. Note that all of the methods in the Temperatures class should be non-static.
Your main program class should contain a main method and a printTemperatures method.
Both of these methods should be static.
The main method should do the following:
(1) prompt the user to enter a high and low temperature;
(2) read these two values;
(3) use the constructor with parameters to create an object of type Temperatures
and initialize it to the read-in values;
(4) use the non-static printTemperatures method to print the values in this object;
(5) use the default constructor to create a new object of type Temperatures;
(6) prompt the user to enter another high and low temperature;
(7) read these two values and use setHighTemp and setLowTemp to put these values
in the new object;
(8) use the static printTemperatures method to print the values in this new object;
(9) compare the low temperatures of your two objects and print out a message
stating whether they are equal; and finally
(10) use the equals method to test your two objects for equality and print out
a message stating whether they are equal.
Make sure that your program listing is properly indented and commented.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
this program will need to run using JCreator
need a Temperatures class
and a TemperaturesTester