need help in this programme.............

This is a discussion on need help in this programme............. within the C++ Programming forums, part of the General Programming Boards category; Develop a class named Fraction. This class handles fractionís numerator and denumerator. It should include three constructors -- one with ...

  1. #1
    Registered User
    Join Date
    Apr 2012
    Posts
    2

    Post need help in this programme.............

    Develop a class named Fraction. This class handles fractionís numerator and denumerator.It should include three constructors -- one with no parameters and which creates the fraction 0/1, one with one parameter numer and which creates the fraction numer/1, and one with two parameters and which creates the fraction numer/denom, but which assures that the fraction will be in normalized form (that is, positive denominator and with the greatest common divisor removed from the numerator and denominator).
    Make sure that the store method also stores fractions in normalized form. The class should also have copy constructor. Add three public methods (functions) to the class, called getNumerator, getDenominator, and display that return the values of the numerator, denominator of the fraction and display fraction.
    The class fraction should be able to overload operators which includes, +,-,*,/,+=,-=,*=,/=,<<,>>,==,!=,<,>,>=,<=,[],++,--,(),&&,||,&,->, ->*
    The header file and implementation files should be separate files.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,794
    What have you done so far and what problems are you facing?
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Apr 2012
    Posts
    2
    i have overloaded different operaters but i dont know how to overload all these operater in one class.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. about this programme
    By kasun007 in forum C Programming
    Replies: 1
    Last Post: 03-07-2011, 07:52 PM
  2. programme
    By muraja in forum C++ Programming
    Replies: 1
    Last Post: 04-14-2010, 12:44 PM
  3. help me with ma c programme..
    By eddie19 in forum C Programming
    Replies: 19
    Last Post: 08-12-2009, 07:53 AM
  4. Need help with this programme
    By korede in forum C++ Programming
    Replies: 2
    Last Post: 05-24-2007, 12:14 PM
  5. please fix this programme
    By carsonng2000 in forum C++ Programming
    Replies: 10
    Last Post: 05-17-2005, 11:16 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21