Need some help with a C# programming assignment. Timeframe. Need by 5 pm EST today. Using Microsoft Visual Studio C# 2010.
Assignment #7
Functionality
The .NET BCL lacks an implementation of a Set class. Your job is to implement a basic Set class. For this
assignment, we’ll use the following definition of a set:
A set is an unordered collection of unique objects of a homogenous type.
ISet<T> and Set<T>
Implement a generic interface called ISet<T> that defines the following methods:
void Add(T element). Adds an element to the set. Does nothing is the element is already in
the set.
T Remove(T element). Removes the element from the set. The removed element is returned.
If the element does not exist, returns null.
bool Contains(T element). Returns a bool value indicating if the given element is currently a
member of the set.
ISet<T> Intersect(ISet<T> otherset). Returns the intersection of the two sets as a new
ISet<T>.
1
Expert's answer
2012-10-30T08:56:59-0400
Unfortunately, your question requires a lot of work and cannot be done for free. Submit it with all requirements as an assignment to our control panel and we'll assist you.
Comments
Leave a comment