Question: In C++ Implement methods bellow. Please use Templates and separate program into set.h, set.cpp and main.cpp In mathematics, a set is a well-defined collection of
In C++
Implement methods bellow. Please use Templates and separate program into set.h, set.cpp and main.cpp


In mathematics, a set is a well-defined collection of distinct data. It is a special bag that does not allow repeated, or duplicate entries. Specifications of the ADT Set is listed below. ADT Set Data: A finite number of distinct objects with the same data type Operations: Procedures Description getCurrentSize() Task: Gets the current number of entries in this set. Input: None Output: The integer number of entries currently in the set. isEmpty() Task: Sees whether this set is empty. Input: None Output: True if the set is empty, or false if not. add(newEntry) Task: Adds a new entry to this set, avoiding duplicates. Input: newEntry, an object to be added as a new entry. Output: True if the addition is successful, or false if the item already is in the set. remove (anEntry) Task: Removes the first occurrence of the specified entry from this set. Input: None. Output: True if the removal was successful, or false if not. remove() Task: Removes one unspecified entry from this set, if possible. Input: None Output: Either the removed entry, if the removal was successful, or null. Task: Removes all entries from this set. Input: None Output: None clear() contains (anEntry) Task: Tests whether this set contains a given entry. Input: anEntry, the entry to locate. Output: True if the set contains anEntry, or false if not. toVector() Task: Retrieves all entries that are in this set. Input: None. Output: A vector containing all the entries currently in the set. union (setB) Task: perform set union operation (AUB) on this set(A) and a given set(B) Input: setB, a given set. Output: The union of two sets (no duplicates). intersection (setB) Task: perform set intersection operation(An B) on this set(A) and a given set(B) Input: setB, a given set. Output: the difference of two sets ( no duplicates). difference (setB) Task: perform set difference operation(A - B) on this set(A) and a given set(B) Input: setB, a given set. Output: the difference of two sets ( no duplicates). 1. Define a class ArraySet using an array that represents a set and implements the ADT Set. Make the ArraySet resizeable. Then write a C++ program that adequately demonstrates your implementation. 2. Define a class LinkedSet using a linked list that represents a set and implements the ADT Set. Then write a C++ program that adequately demonstrates your implementation. In mathematics, a set is a well-defined collection of distinct data. It is a special bag that does not allow repeated, or duplicate entries. Specifications of the ADT Set is listed below. ADT Set Data: A finite number of distinct objects with the same data type Operations: Procedures Description getCurrentSize() Task: Gets the current number of entries in this set. Input: None Output: The integer number of entries currently in the set. isEmpty() Task: Sees whether this set is empty. Input: None Output: True if the set is empty, or false if not. add(newEntry) Task: Adds a new entry to this set, avoiding duplicates. Input: newEntry, an object to be added as a new entry. Output: True if the addition is successful, or false if the item already is in the set. remove (anEntry) Task: Removes the first occurrence of the specified entry from this set. Input: None. Output: True if the removal was successful, or false if not. remove() Task: Removes one unspecified entry from this set, if possible. Input: None Output: Either the removed entry, if the removal was successful, or null. Task: Removes all entries from this set. Input: None Output: None clear() contains (anEntry) Task: Tests whether this set contains a given entry. Input: anEntry, the entry to locate. Output: True if the set contains anEntry, or false if not. toVector() Task: Retrieves all entries that are in this set. Input: None. Output: A vector containing all the entries currently in the set. union (setB) Task: perform set union operation (AUB) on this set(A) and a given set(B) Input: setB, a given set. Output: The union of two sets (no duplicates). intersection (setB) Task: perform set intersection operation(An B) on this set(A) and a given set(B) Input: setB, a given set. Output: the difference of two sets ( no duplicates). difference (setB) Task: perform set difference operation(A - B) on this set(A) and a given set(B) Input: setB, a given set. Output: the difference of two sets ( no duplicates). 1. Define a class ArraySet using an array that represents a set and implements the ADT Set. Make the ArraySet resizeable. Then write a C++ program that adequately demonstrates your implementation. 2. Define a class LinkedSet using a linked list that represents a set and implements the ADT Set. Then write a C++ program that adequately demonstrates your implementation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
