// 22.5HV2 Software Engineering II // Unit 3 Exercise 2 #include class Imperial { friend ostream& operator<<(ostream&, const Imperial&); friend istream& operator>>(istream&, Imperial&); friend Imperial operator+(const Imperial&, const Imperial&); friend Imperial operator-(const Imperial&, const Imperial&); friend bool operator<(const Imperial&, const Imperial&); friend bool operator>(const Imperial&, const Imperial&); friend bool operator<=(const Imperial&, const Imperial&); friend bool operator>=(const Imperial&, const Imperial&); friend bool operator==(const Imperial&, const Imperial&); friend bool operator!=(const Imperial&, const Imperial&); public: Imperial(int st=0, int lb=0, int oz=0): stones(st), pounds(lb), ounces(oz) { reduce(); } private: void reduce(); int stones, pounds, ounces; };