I need help with writing functions in C++. The C++ class I am in is going like way too fast and it's like the basic (not BASIC) class. First of all I would like to know what I am doing is correct. Like in noted in the rules I am not looking for you to write the whole program, well unless you want to.
Write the set.h file. There are guidelines for this file. For the sake of commonality, I am giving you the member functions and the private data. Make sure you stick to my names so that I can swam files in and out to test them.
- Your private data should include an array of doubles (size = 100) called setArray. Itshould also include one integer called size . These structures will be used to store the set data (the elements) and to keep track of the set size (respectively).
- Your public functions should include all of and only the following:
- set() //a constructor
- printSet //prints the object to the console
- setUnion //unions the object with another set
- setInteresection //intersects object with another set
- isEmpty //determines if the object is empty
- isElementOf //determines if an element is in a object
- addElement //adds element to the object
- deleteElement //removes an element from the object
- getSize //returns the current size of the object
- isEqual //determines if the object is equal to a set
now I'm thinking that it is...
Wait I don't have the answer with me but I will like in about half an hour. But if you want to help out please do.