Develop a program to compare the performance of search, add and delete for data structures in Java Collections. Your program should support the following menus:

computer science

Description

Develop a program to compare the performance of search, add and delete for data structures in Java Collections. Your program should support the following menus:

 

File

·         About

·         Exit

 

Collections

·         Open Files (open 4 files and load them into arrays)

·         Array List

·         Linked List

·         Hash Set

·         Linked Hash Set

·         Tree Set

 

You will be provided with four files, Data File (Data File) containing unique integer numbers and Search Keys file (Search Keys) containing keys to search for, Add Keys (keys to add to the collection) and Delete Keys (Keys to delete from the collection.

 

           

 

Display the file name and the number of keys read after opening the files:

 

Use the data in Data File to create the collection (use data file), search for keys (Search Keys file), add keys to the collection (use Add Keys file) and delete keys from the collection (use Delete Keys file). For each experiment measure the average access time (Total Time/#keys).

 

Display the results in a tabular format with nature and count of data items, number of search keys, add keys and delete keys.

 

 


Related Questions in computer science category