Question: Given the following table. Consider the fol owing code publie class AverageTeeperature public String Month public float Hih 68- public fleat Low-34.f public AverageTerperature(Striz Ionth,

Given the following table.

Given the following table. Consider the fol owing code publie class AverageTeeperature

Consider the fol owing code publie class AverageTeeperature public String Month public float Hih 68- public fleat Low-34.f public AverageTerperature(Striz Ionth, fleat Ikigh, float InLew) Month InMonth HighInHigh public String tostring) Client.java Leport java.ti.ArrayList; import java.til.alaiens public class Client publie static vold rain(String ans) tesperaturvs.add(newAverageTemperaturearuary. 63, 51)); temperatures.add(nes AverageTemperatureFebruary.63, 52)) temperatures.add(new AverageTemperature"March4, 54)) Collections .act terperatures ; Create 2 source fies (AveageTemperature.java and Cient java) and try running the code. Why is there a problem? lprowide andwer so the question in the suomissi on commentary box) Implement the Comparable interface in AverageTemperature dlass so that months are ordered based on the high temperature, and ties are broken by low temperature. 2. 3. Modfy the clent code so that missing moths are added to the temperatures aray Make sure that the output has months in the ascending order from lower to higher

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!