Question: Create a class Rectangle keeping in mind that rectangle have length and width. One should be able to calculate the perimeter () and the area()
Create a class Rectangle keeping in mind that rectangle have length and width. One should be able to calculate the perimeter () and the area() of the rectangle, can set a value to length and width and retrieve the value of Length & width. Where 0 < length < 21 0 < width < 21 Area of Rectangle=length*width; Perimeter of Rectangle=(length+width)*2;
(C++ OOP) comments with each line.
Step by Step Solution
3.49 Rating (152 Votes )
There are 3 Steps involved in it
include using namespace std class Rectangle create class cal... View full answer
Get step-by-step solutions from verified subject matter experts
