Thread: Help with Fraction class

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    11

    Fraction class

    Hi there, I am running on empty with no sleep. I am trying to complete a programm for school and I am getting frustrated. I just can't tkink anymore.

    I have to build a Fraction class based upon the following specifications:
    · Have two integer data members, for nominator and denominator. It should also have a static data member to count the number of fraction objects created.
    · Have the following member functions
    - addFraction, which should add the two fraction objects and return the result
    - subFraction, which should subtract a fraction from another fraction object and return the result
    - divideFraction, which should divide one fraction with another fraction object and return the result
    - multiplyFraction, which should multiply two fraction objects and return the result
    - Constructor functions
    - Accessor and mutator functions
    - numberofObject, which should return the value of count.

    The main() was already given.

    I have attached what I have so far.
    Last edited by cheeisme123; 06-04-2002 at 11:41 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. class composition constructor question...
    By andrea72 in forum C++ Programming
    Replies: 3
    Last Post: 04-03-2008, 05:11 PM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. Creating a database
    By Shamino in forum Game Programming
    Replies: 19
    Last Post: 06-10-2007, 01:09 PM
  4. Mmk, I give up, lets try your way. (Resource Management)
    By Shamino in forum Game Programming
    Replies: 31
    Last Post: 01-18-2006, 09:54 AM