Question: Can you solve the following using Java, please. Included in the images is the original code, that I would like to have modified: This program

Can you solve the following using Java, please. Included in the images is the original code, that I would like to have modified:
This program lets you read data from a file but store it in a tree-based data structure, which allows for faster lookups.
This program builds a class to create, populate and search for items in different data structures then compare the execution time of each implementation.
Rewrite the class WeatherReport, so that it calculates the statistic proposed: My proposal for a statistic would be the average wind direction and speed by state. This would calculate for each state monthly by taking the directional data from all weather stations within a state and calculating the average direction for each month.
Replace the Temperature class with a new class that contains data you need, but nothing else.
1. Constructor with no parameters. It should create a list of 8-10 objects which you can use for testing.
2. Constructor with one String parameter the name of a text file with weather information. This is the same as it was previously, except storing the data in a different object, since your statistic will need different pieces of the input data. If you were to implement my example of lowest temperature at each weather station, your object would contain the weather station name and the low temperature.
3. computeByList() this method has no parameters, accesses the data created by the constructor, and computes your statistic by creating, searching and updating a new List (either LinkedList or ArrayList. It should return the List that was created. Using my example, the returned list would contain [BHM27,HSV25,MOB35...]
4. computeByTree() this method has no parameters, accesses the data created by the constructor, and computes your statistic by creating, searching and updating a new TreeMap. It should return the TreeMap that was created. As in the previous step, the TreeMap should have the same elements and values, though when you print the TreeMap you will probably get the items in a different order. If your items are not the same, then something is amiss.
5. main test your class by writing a main method that creates at least two WeatherReport objects and computes the run times of calling computeByList() and computeByTree()for each one. Then print each of the returned objects. The statistics computed should be the same for each method.
The information from the weather.txt file is in the following format:
Average,City,Code,Direction,Full,Maximum,Minimum,Month,Precipitation,WindSpeed,State,Day,Year
39,Birmingham,BHM,33,1/3/2016,46,32,1,0,4.33,Alabama,3,2016
39,Huntsville,HSV,32,1/3/2016,47,31,1,0,3.86,Alabama,3,2016
46,Mobile,MOB,35,1/3/2016,51,41,1,0.16,9.73,Alabama,3,2016
 Can you solve the following using Java, please. Included in the

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!