[SOLVED] CS146-Project 1

20.99 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

Rate this product

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:

  1. Add a new item to the set. If the item is already in the set then nothing happens.
  2. Remove an item from the set.
  3. Return the number of items in the set.
  4. Determine if an item is a member of the set.
  5. Return a reference to each item in the set (given an item)
  6. Determine the union (i.e. set of all distinct elements) and the intersection (i.e. set of all common distinct elements) of two sets.
  • 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().
Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.