Question: In this assignment, you are to design a Generic Set using operator overloading to succeed in the NUnit tests. The operators you are to overload

In this assignment, you are to design a Generic Set using operator overloading to succeed in the
NUnit tests. The operators you are to overload are the following:
I to implement a Set Union
& to implement a Set Intersection
to implement a Set Difference
, to implement Adding a single element to the Set
== and != to denote if two Sets are equal or not equal, respectively
true and false to implement the Set being non-empty and empty, respectively
adding indexers to allow for the use of []
Two other aspects of Sets to be mindful of are the following:
No element is repeated
Elements are ordered(sorted)
Here is the code below:
public class Set where Element : IComparable{
public List set;
public Set(){
set = new List();
}
public Set(List set){
this.set = set;
}
//NOTE - Add functions here
}
}
 In this assignment, you are to design a Generic Set using

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!