Question: Write a class rectangle (preferably .h and .cpp) that can be used in order to make the following code work correctly according to the comments.

  1. Write a class rectangle (preferably .h and .cpp) that can be used in order to make the following code work correctly according to the comments.

#include

#include

#include \"rectangle.h\"

using namespace std;

int main()

{

rectangle r1, r2, r3;

r1.setValues(12, 4); // sets the values of width and height

r2.setValues(6, 13);

r3.setValues(10, 7);

cout

cout

cout

cout

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Programming Questions!