Advertisement
Guest User

Untitled

a guest
Aug 25th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #include "lab01b_printBits_2.hpp"
  2.  
  3. class LargerSet
  4. {
  5. public:
  6. // maxValue argument is the number of possible elements.
  7. // for example: maxValue is 100 for the range [0, 100)
  8. LargerSet(unsigned maxValue);
  9.  
  10. ~LargerSet();
  11. bool addElement(unsigned int); // add a new element to the set. No-op if input is invalid.
  12. bool deleteElement(unsigned int); // delete an element from the set. No-op if not a member.
  13. bool isMember(unsigned int);
  14. unsigned int numElements();
  15. void printElements(); // prints members from smallest to largest.
  16.  
  17. private:
  18. unsigned long *set; // internal representation of our set.
  19. unsigned maxElementValue;
  20. unsigned numBuckets;
  21.  
  22. LargerSet &operator=(const LargerSet &); // disallow assignment
  23. LargerSet(const LargerSet &); // disallow assignment
  24. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement