Program 2

Overloading = in rationalType: In order to include a statement such as
rat3=rat1+rat2;
which inherits + from fraction, you need to be able to assign a fraction (rat1+rat2 returns
fraction) to a rational (rat3). This means overloading assignmant (=) as follows
In rational.h:
//assign a fraction to a rational
rationalType operator=(const fractionType&) const;
In rational.cpp
const rationalType rationalType::operator=(const fractionType& otherFraction)  
{
    numerator  =otherFraction.getNumerator();
    denominator=otherFraction.getDenominator();
    return *this;
}
// This allows a fraction to be assigned to a rational. Otherwise we 
// get "no operator defined which takes a right-hand operand of type 
// 'class fractionType' (or there is no acceptable conversion)"

Other:

  1. Derived classses do not inherit the constructors.
    You need to add one to rationalType to use it.
  2. Remember ; at the end of the class header.
  3. When overloading << and >> use #include <iostream.h> and remove using namespace std;
  4. Overload operators in fraction before tackling inheritance.
  5. If you get " 'class' type redefinition" use the compiler directives "#ifndef...
  6. gcd is a separate file, not part of fraction or rational.
  7. Put your name on all pieces.