Title: CMSC 341
1CMSC 341
2 3Set Class
Set() // Construction of an empty set
(constructor of no arguments). Set(const Set )
// Construction of a set as a copy of another set
(copy constructor). Set() // Destruction of a
set (destructor). const Set operator(const
Set rset) // assignment operator. size() //
returns the number of elements in the set bool
isEmpty() const // returns true if the set is
empty. bool isMember(const Object x) const
//returns true if element x is present in the
set. void MakeEmpty() //causes the size of the
set to become zero. Set operator (const Set
S) // the set union operator. bool
operator(const Set S) // The equality
operator
4bool operator lt (const Set S) Set operator-
(const Set S) // the set difference operator.
operator (const Object obj) // inserts obj
into the host Set. Set operator - (const
Object obj) // removes obj from the host Set.
ostream operatorltlt(ostream , const Set )
5Set Class
vectorltObjectgt _ndata int number_of_recs
6Submit
- The class name for project submittal is "cs341".
Use the same class name, regardless of your
section. - The project names are "Proj1", "Proj2",
"Proj3", "Proj4" and "Proj5". - Example If you want to submit the file "Proj1.C"
for project 1, then you issue the following
command - submit cs341 Proj1 Proj1.C
- Use the submitls command to list the files you
have submitted. - For example, to list the files you have submitted
for project 1 submitls cs341 Proj1 - Use the submitrm command to remove files you
submitted previously. - submitrm cs341 Proj1 p1.c