(Solved) : Exercise P514 Implement Class Rectangle Works Like Graphics Classes Circle Line Rectangle Q44083910 . . .
Exercise P5.14. Implement a class Rectangle that works just likethe other graphics classes such as Circle or Line. A rectangle isconstructed from two corner points. The sides of the rectangle areparallel to the coordinate axes:

You do not yet know how to define a << operator to plot arectangle. Instead, define a member function plot. Supply afunction move. Pay attention to const. Then write a sample programthat constructs and plots a few rectangles.
Exercise P5.15. Enhance the Rectangle class of Exercise P5.14 byadding member functions perimeter and area that compute theperimeter and area of the rectangle.
The details of plot and move are not given in the question,therefore provide your own specific code for them. There are theinstructions on which library to use in the problem so usewhichever library you’d like.
Code in C++ Graphic
Expert Answer
Answer to Exercise P5.14. Implement a class Rectangle that works just like the other graphics classes such as Circle or Line. A re…
OR