My first C++ program and no idea where to begin. We are to design and implement
a Set class which should have these methods:
Set_Display -- list entire contents of set to screen
Set_Empty -- make a set empty of all members
Set_Intersection -- resultant set is elements in both sets
Set_Union -- resultant set is elements in either set
Set_Difference -- resultant set is element in first set but not in second
set
Set_Complement -- resultant set is set of elements not in original set
Overload these operators for objects of type set
* same as intersection
+ same as union
/ same as set difference
! complement set
To keep things simple, let's assume our Universal Set can be declared by the
instantiation of an object named UniverseSet and initialized to whatever
elements
are included in a string as:
Set UniversalSet("A,B,C,D,1,2,3,4,5,6,E,F,G,H");
all subsequent sets will be in terms of this UniversalSet.