#ifndef MYSET_H
#define MYSET_H
#include
#include
#include
#include
using namespace std;
#define MAX_SET_SIZE 100 // Default maximum set size
template // DEFINE element_type
class MySet {
private:
element_type *Container;
int setSize;
string setName;
int maxSetSize;
public:
MySet();
MySet(string label);
MySet(string label, int maxSize);
MySet(int maxSize);
MySet(const MySet &secondSet);
~MySet();
int cardinality() {return setSize;}
bool inSet(element_type element);
bool isFull();
element_type getElement(int index);
void setLabel(string label); // sets the name of the set
MySet operator - (MySet a, element_type b);
MySet operator - (MySet a, MySet b);
MySet operator += (MySet a, element_type b);
MySet operator += (MySet a, MySet b);
MySet operator -= (MySet a, element_type b);
MySet operator = (MySet a, element_type b);
};
2007-02-21
11:58:58
·
4 answers
·
asked by
Anonymous
in
Science & Mathematics
➔ Engineering
#ifndef MYSET_H
#define MYSET_H
#include
#include
#include
#include
using namespace std;
#define MAX_SET_SIZE 100 // Default maximum set size
template // DEFINE element_type
class MySet {
private:
element_type *Container;
int setSize;
string setName;
int maxSetSize;
public:
MySet();
MySet(string label);
MySet(string label, int maxSize);
MySet(int maxSize);
MySet(const MySet &secondSet);
~MySet();
int cardinality() {return setSize;}
bool inSet(element_type element);
bool isFull();
element_type getElement(int index);
void setLabel(string label); // sets the name of the set
MySet operator - (MySet a, element_type b);
MySet operator - (MySet a, MySet b);
MySet operator += (MySet a, element_type b);
MySet operator += (MySet a, MySet b);
MySet operator -= (MySet a, element_type b);
MySet operator = (MySet a, element_type b);
};
#endif
2007-02-21
12:00:18 ·
update #1
forgot to include #endif, so just refer to the second details posting...
2007-02-21
12:01:46 ·
update #2
I don't know how to implement the constructors for one...
2007-02-21
12:03:47 ·
update #3
I'm sorry I'm such a dumb f***... I used to be bad into the habit of procrastinating... It's still a problem, but I'm getting better. You're right... I'm a f***ing loser and I should go to Hell for procrastinating on this.
If you had bothered to read the note above this one, I think you would know what the problem was, assuming it would have mattered.
I'm not cut out for this crap... I failed Calculus once, and I haven't done too well in any of the classes that will count towards my major.
I e-mailed my prof. early today and he still hasn't gotten back with me. I have exhausted every resource I've got.
I'm behind in all my other classes too...
If you would like to criticise me, make it constructive criticism... PLEASE!
2007-02-21
14:57:41 ·
update #4