New Activity
Play Fill in the Blanks Game
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 ;
}