class Name { public: Name(); // constructor int length(); // returns # characters in name char operator [](index k); // return k-th character of name bool Equal(const Name & rhs); // check equality private: // declarations here }; bool operator == (const Name & lhs, const Name & rhs) // postcondition: returns true if lhs == rhs, otherwise returns false { return lhs.Equal(rhs); }