Chat with us, powered by LiveChat Compare the CPU and memory efficiency between HashSet and TreeSet​ | WriteDemy

Question Description

You must include your name in every file that you submitted.

You are not allowed to submit binary files, including zip files, image files, and bytecodes.

Please name your Java file/class as YourLastNameQZ3.java, e.g., YaoQZ3.java

Objective: Compare the CPU and memory efficiency between HashSet and TreeSet

Input files: qz3Data.csv and qz3ID.txt

Assumption: The number of records in qz3Data.csv is unknown

The data file “qz3Data.csv” is a csv (comma separate value) file and contains 6 fields, separated by commas,on each line:

ID, City, State, Zip Code, Amount, Date

Listed below are some sample lines:

71300cc5-d751-57c9-ba81-4a69e48745d1,Bisuhub,RI,53353,$6534.03,09/08/2070

78f52baf-91fe-5861-9659-24f38a539018,Dekgiihi,GA,13754,$776.26,03/04/1916

You are required to develop a Java program to:

1. Read all data records from qz3Data.csv file into java.util.HashSet and java.util.TreeSet.

2. Display the memory used by HashSet created in step 1.

3. Display the memory used by TreeSet created in step 1.

4. Read one ID from qz3ID.txt and search against HashSet created in the step 1. Repeat this operation for allIDs in qz3ID.txt. Display the CPU Time used for this operation.

5. Read one ID from qz3ID.txt and search against TreeSet created in the step 1. Repeat this operation for allIDs in qz3ID.txt. Display the CPU Time used for this operation.

Hint: This program generates 4 lines of putput.

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Place Order” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order