Problem Statement: Create ADT that implements the SET concept using linked list or arrays. Background: A set is an abstract data type that can store unique values, without any particular order. The value of the element cannot be modified once it is added to the set, though it is possible to remove and add the modified value of that element. Unlike list type, rather than retrieving a specific element from a set, one typically tests a value for membership in a set. The type of sets we want to implement is dynamic sets. Dynamic sets allow to change after they are constructed. Sets allow query operations on their elements - such as checking whether a given value is in the set, or enumerating the values in some arbitrary order. Sets can be implemented using various data structures, which provide different time and space trade-offs for various operations. It can be implemented using arrays or linked list. In this assignment we have to use arrays to implement the SET data structure. We have to use template concept so that sets can be of any type. Following Basic Operations has to be implement in this assignment: 1) InsertItem(Item): Add Item to the SET. No duplicate elements can be inserted in any order. 2) Removeltem(Item): Remove the Item from SET. 3) FindItem(Item): Return true if Item is in SET. 4) Size(): Return number of elements in the SET. 5) Reset(): Resets the current position to the beginning of the SET which is used to loop over the SET elements using GetNextItem() function. 6) GetNextItem(): Returns the next element in the SET according to the current position. 7) IsLastltem(): Returns true of the current position is at the last element in the SET. 8) Intersection(aSet): Returns new SET object which represents the intersection of two sets. 9) Union(aSet): Returns new SET object which represents the union of two sets. 10) Difference(set): Returns new SET object which represents the intersection of two sets. 11) IsSubsetOf(aSet): return true if SET in subset of aSet. 12) ISEqual(aSet): returns true if two sets are equal. 13) MakeEmpty(): Deletes all elements in the SET. 14) ISEmpty(): Returns true if the SET is empty. 15) IsFull(): Returns true if the SET is full. 16) Print(): Print all elements in the SET.
Problem Statement: Create ADT that implements the SET concept using linked list or arrays. Background: A set is an abstract data type that can store unique values, without any particular order. The value of the element cannot be modified once it is added to the set, though it is possible to remove and add the modified value of that element. Unlike list type, rather than retrieving a specific element from a set, one typically tests a value for membership in a set. The type of sets we want to implement is dynamic sets. Dynamic sets allow to change after they are constructed. Sets allow query operations on their elements - such as checking whether a given value is in the set, or enumerating the values in some arbitrary order. Sets can be implemented using various data structures, which provide different time and space trade-offs for various operations. It can be implemented using arrays or linked list. In this assignment we have to use arrays to implement the SET data structure. We have to use template concept so that sets can be of any type. Following Basic Operations has to be implement in this assignment: 1) InsertItem(Item): Add Item to the SET. No duplicate elements can be inserted in any order. 2) Removeltem(Item): Remove the Item from SET. 3) FindItem(Item): Return true if Item is in SET. 4) Size(): Return number of elements in the SET. 5) Reset(): Resets the current position to the beginning of the SET which is used to loop over the SET elements using GetNextItem() function. 6) GetNextItem(): Returns the next element in the SET according to the current position. 7) IsLastltem(): Returns true of the current position is at the last element in the SET. 8) Intersection(aSet): Returns new SET object which represents the intersection of two sets. 9) Union(aSet): Returns new SET object which represents the union of two sets. 10) Difference(set): Returns new SET object which represents the intersection of two sets. 11) IsSubsetOf(aSet): return true if SET in subset of aSet. 12) ISEqual(aSet): returns true if two sets are equal. 13) MakeEmpty(): Deletes all elements in the SET. 14) ISEmpty(): Returns true if the SET is empty. 15) IsFull(): Returns true if the SET is full. 16) Print(): Print all elements in the SET.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 6 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education