Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please develop a Java program to 1. Read records from pj5Data.csv file into 2 data structures: - java.util.TreeSet - a binary search tree data structure

Please develop a Java program to 1. Read records from pj5Data.csv file into 2 data structures: - java.util.TreeSet - a binary search tree data structure 2. Show the memory used by each of the above 2 data structures. 3. Read lines from passwordInput.txt and search them against the above 2 data structures. Repeat this search operation 4,000 times. 4. Show the CPU time used in the above search operations.

Please name your driver file/class as YourLastNamePJ5.java

The data file, pj5Data.csv, is a csv (comma separate value) file fields are separated by commas. Each line contains 2 fields: user Name and password. Listed below are some sample lines: carmella@aboulahoud.com, Aboulahoud clemente@aboulissan.com, Aboulissan

Each line in the file, passwordInput.txt, contains a user name (email address). Listed below are some sample lines:

jan@hariri.com amelia@harkavy.com

Objective: Compare the CPU and Memory efficiency between java.util.TreeSet and the binary search tree data structure.

Input files: pj5Data.csv and passwordInput.txt Assumption: - The number of records in pj5Data.csv is unknown. - Your program will skip/reject dirty data lines. For example, if a line contains 3 fields, it is considered as a dirty data line and will be rejected/skipped by your program.

Each line in the file, passwordInput.txt, contains a user name (email address).

You are required to develop a Java program to 1. Read records from pj5Data.csv file into 2 data structures: - java.util.TreeSet - a binary search tree data structure 2. Show the memory used by each of the above 2 data structures. 3. Read lines from passwordInput.txt and search them against the above 2 data structures. Repeat this search operation 4,000 times. 4. Show the CPU time used in the above search operations.

Hint: This program generates 2 or 4 lines of output.

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

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

What is meant by staff authority ?

Answered: 1 week ago

Question

Discuss the various types of policies ?

Answered: 1 week ago

Question

Briefly explain the various types of leadership ?

Answered: 1 week ago

Question

Explain the need for and importance of co-ordination?

Answered: 1 week ago

Question

Explain the contribution of Peter F. Drucker to Management .

Answered: 1 week ago