#ifndef FEETINCHES_H #define FEETINCHES_H #include using namespace std; class FeetInches { private: int feet; int inches; void simplify(); public: FeetInches(int f = 0, int i = 0) { feet = f; inches = i; simplify(); } void setData(int f, int i) { feet = f; inches = i; simplify(); } int getFeet() { return feet; } int getInches() { return inches; } // Overloaded arithmetic, boolean, and io operators. FeetInches operator + (const FeetInches &) const; FeetInches operator - (const FeetInches &) const; FeetInches operator++(); FeetInches operator++(int); bool operator>(const FeetInches &) const; bool operator<(const FeetInches &) const; bool operator==(const FeetInches &) const; friend ostream &operator<<(ostream &, FeetInches &); friend istream &operator>>(istream &, FeetInches &); }; #endif