Question: Implement the C++ class Rectangle below. write C++ code to test the class in the case of Rectangle object: l. Centered at the origin, and

 Implement the C++ class Rectangle below. write C++ code to test

Implement the C++ class Rectangle below. write C++ code to test the class in the case of Rectangle object: l. Centered at the origin, and has width = 6, height = 4 using the class constructor 2. Centered at (x, y) = (1, 1) and has width = height = 5 using the class shift and reset methods #includ e using namespace std; class Rectangle {public: Rectangle(double center_x, double center_y, double width, double height);//Constructor double area();//Return area of a Rectangle object double perimeter();//Return perimeter of a Rectangle object void shift(double shift_x, double shift_y);//Shift a Rectangle object from the center by the amount {shift _x, shift y) void reset(double width, double height);//Mutate function double get();//Accessor function private: double center_x, center_y double width', double height-, }

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 Databases Questions!