Thread: C++ Programming (Problem One)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    23

    Exclamation C++ Programming Set Class (Problem One)

    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.


    Problem One.
    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.
    Last edited by Nicknameguy; 10-16-2002 at 12:51 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM