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_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
are included in a string as:
all subsequent sets will be in terms of this UniversalSet.
That seems like a hard first program for you to have to write. Did you not pay attention in class at all?
You should know how to create the class and the methods, don't you? This will show you how to do the overloading
Your first C++ program and you're using classes?
Why don't you try doing your own homework and when you get stuck somewhere post the code you have so far (or at least the code that is giving you trouble) and we'll be glad to help.
So far all you've posted is the outline of your assignment and from the looks of things haven't attempted to write the first line of code for it, but you're asking someone here to do it for you.
figure out how to do what you want to do without writing code first. Then try to write the code. Then ask pertinent questions either about the underlying algorhythm or the code itself.
I am looking for the end of this begining....