//--------------------------------------------------------------------------- #ifndef RATIONALCLASS_H #define RATIONALCLASS_H //--------------------------------------------------------------------------- #include "boolean.h" class rational { public: //----Constructors rational(void); rational(int N, int D); //----Set the value. Fails if D is not natural boolean Set(int N, int D); //----Add rational Add(rational OtherOne); //----Read. Fails if D is not natural boolean Read(void); //----Write void Write(void); private: int Numerator, Denominator; }; //--------------------------------------------------------------------------- #endif //---------------------------------------------------------------------------