Reference no: EM132217493
To be written using Java;
Design a class TemperaturePattern that has the following two fields: number_of_days_in_period and temperature_on_first_day. Class should have
- a constructor to set the values of these two fields.
- a method findFinalDayTemperature that would return the temperature on the final day of the period specified by the number_of_days_in_period field.
Test this class, the program will first ask the users to enter the number of days in the specified period and the temperature on the first day.
For example, if a user enters as follows:
Number of the days in the period: 11
Temperature on the first day: -10
Then the program should display the following:
Temperature on the final day would be: -12
way temp fluctuates in question 4. #1
The method should display the following: Day Temperature
1 -10
2 -12
3 -14
4 -16
5 -18
6 -17
7 -16
8 -15
9 -14
10 -13
11 -12