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

1 Expert Approved Answer
Step: 1 Unlock

include using namespace std class Rectangle create class cal... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Law Questions!