compare the cpu and memory efficiency between java util treemap and the binary search tree
Objective: Compare the CPU and Memory efficiency between java.util.TreeMap and the binary search tree.
Input file: hw4Data.csv (The same data file used in Homework #4 and Homework #5).
Assumption: The number of records in hw4Data.csv is unknown
The data file “hw4Data.csv†is a csv (comma separate value) file and contains 3 fields, separated by commas, on each line:
Property ID, County, Price
Listed below are some sample lines:
119736,CLAY COUNTY,792148.9
448094,CLAY COUNTY,1438163.57
206893,CLAY COUNTY,192476.78
333743,CLAY COUNTY,86854.48
172534,CLAY COUNTY,246144.49
Please develop a Java program to:
1. Read all data records from hw4Data.csv file into 2 data structures:
ï‚· Binary search tree
ï‚· java.util.TreeMap
2. Show the memory used by the binary search tree
3. Show the memory used by java.util.TreeMap
4. Sort records in ascending order by Property ID (smallest first) and display the CPU used for such an operation. Perform these operations on the data structured created in Step 1.
Hint: This program generates at most 4 lines of output.