#ifndef FEETINCHES_H #define FEETINCHES_H // A class to hold distances or measurements expressed // in feet and inches. 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 and boolean 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; }; #endif