Question: using c++ Write the definition for a class called Rectangle that has int data members length and width . Define accessor and mutator functions. Define
using c++
Write the definition for a class calledRectanglethat has int data memberslengthandwidth.
Defineaccessorandmutatorfunctions.
Define two constructors i. default and ii. Constructor with two parameters.
Define intperimeter()to calculate and return the perimeter of the rectangle, intarea()to calculate and return the area of the rectangle. voidshow()to display the output.
Overload the equalityoperator ==, post incrementoperator++as member functions to check if two rectangle objects (width and length) are same or not and to increase length and width.
Test your program by user given input for length and width.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
