CS146 Data Structures and Algorithms Programming Project 1 solution

$24.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (6 votes)

Write a program that implements a set of items (strings) using a singly linked list. A set is a collection of items in which no item occurs more than once. Your project should externally support the following functions: a) Add a new item to the set. If the item is already in the set then nothing happens. b) Remove an item from the set. c) Return the number of items in the set. d) Determine if an item is a member of the set. e) Return a reference to each item in the set (given an item) f) Determine the union (i.e. set of all distinct elements) and the intersection (i.e. set of all common distinct elements) of two sets. ● [extra points 3pts] Create different sets of different data types (for example, strings, integers, or other objects from other comparable classes). Generics. ● Include appropriate JUnit tests. (no main method) ● Count the time it takes to execute each of the above operations. Note: To count the time use system.currentTimeMillis(). Programming Standards: ● See project rubric on canvas for details. Deliverables: ● For JUnit tests check canvas. ● Eclipse, use export project ● Use cs146S21..project1 as your package, and don’t need a main method, only JUnit java tests. ● What to submit to canvas (Steps): ○ Export your project on eclipse with your entire project (source code). Otherwise include a Readme file. ○ Create a zip file named LastnameFirstProjectName.zip that includes the exported zip file + pdf report ○ upload the last zip file to canvas. ● All projects need to compile. If your program does not compile you will receive 0 points on this project. ● Add meaningful comments. ● Do not use any fancy libraries. We should be able to compile it under standard installs. Include a readme file on how to compile the project.