This chapter uses the class rectangleType to illustrate how tooverload the operators +, *, ==, !=, >>, and <<. Inthis exercise, first redefine the class rectangleType by declaringthe instance variables as protected and then overload additionaloperators as defined in parts a to c.
Part a: Overload the pre- and post-increment and decrementoperators to increment and decrement, respectively, the length andwidth of a rectangle by one unit. (Note that after decrementing thelength and width, they must be positive.)
Part b: Overload the binary operator – to subtract thedimensions of one rectangle from the corresponding dimensions ofanother rectangle. If the resulting dimensions are not
PayPal Gateway not configured
PayPal Gateway not configured