Completar frases ProgrammingVersión en línea Practice Programming por Liz Smith 1 initSide area side bool s2 endl SetSide s1 is GetSode return side namespace square operator> cout Square const GetArea int #include side The side of s1 side void initSide Purpose : Overload operators for a class type as inline number functions / / for standard i / o using std ; / / reserve library objects for standard use / / declare the Square class type to model a square class Square { public : Square ( ) { = 1 ; } / / the default constructor that initialize the side to 1 Square ( ) { = ; } / / the explicit constructor that initialize the side to a parameter int ( ) { return side ; } / / get the side of the square ( int newSide ) { side = newSide ; } / / change the side of the int GetArea ( ) const { return * ; } / / get the area of the square ( Square rhs ) const { > rhs . side ; } / / the greater operator private : int side ; / / the side of a square } ; int main ( ) { , / / declared ( created ) by us the default constructor s2 ( 3 ) ; / / declare ( created ) by using the explicit constructor / / display the area of s1 and s2 cout << " " << s1 . GetArea ( ) << endl ; << " The area of s2 is " << . ( ) < s2 ) cout << " s1 is bigger than s2 " < ( s2 ) ) else ; cout << " s1 id not bigger than s2 " << ; / / successfully done return 0 ; }