Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please develop a Java program to compare the CPU and Memory efficiency between java.util.TreeSet and java.util.HashSet by doing the following; 1. Read records from a

Please develop a Java program to compare the CPU and Memory efficiency between java.util.TreeSet andjava.util.HashSet by doing the following;

1. Read records from a .csv file into 2 data structures:

java.util.TreeSet

java.util.HashSet

2. Show the memory used by each of the above 2 data structures.

3. Read lines from a .txt file and search them against the above 2 data structures.

Repeat this search operation

4. Show the CPU time used in the above search operations.

Below are details about the two files:

The .csv file contains a username and password. Below are some sample records:

carmella@aboulahoud.com, Aboulahoud

clemente@aboulissan.com, Aboulissan

The .txt file contains a password. Below are some sample records:

nicky@hartzler.com

carmel@harvest.com

(I can't attach the files so just copy/paste the samples onto .txt and .csv)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions