#ifndef RATIONAL_HEADER #define RATIONAL_HEADER class Rational { int numerator; int denumerator; bool gt(const Rational& other) const; bool lt(const Rational& other) const; int gcd() const; public: Rational(); Rational(int numerator, int denumerator); int get_numerator() const; void set_numerator(int numerator); int get_denumerator() const; void set_denumerator(int denumerator); void canonize(); void canonizeRec(); // Recursive canonize, that doesnt need gcd as a separate func // Could easily be done with just normal functions, but this is more fun Rational operator+(const Rational& other) const; Rational operator-(const Rational& other) const; Rational operator*(const Rational& other) const; Rational operator/(const Rational& other) const; int numcmp(const Rational& arg) const; void print() const; }; #endif