Question: 1 ) ( 5 pts ) Graphics Obiects: Write a graphics program using the ccce win libraries. Your program should define a class Square, that

1)(5 pts) Graphics Obiects: Write a graphics program using the ccce win libraries. Your program should define a class Square, that represents a square whose sides are parallel to the X and Y axes. Your main program should prompt the user to mouse-click 2 points, and draw those points, then construct a Square object using the first point as a corner of the square, with the other point on a side of the Square (Hint: take the side length of the square to be either the X difference between the 2 points, or the Y difference, whichever is greater). Include a move() function and plot() function as part of the class, and have your main program demonstrate that move() works, to move the square to a \(3^{\text {rd }}\) point clicked by the user. Have your main program repeatedly prompt for mouse clicks, and repeatedly draw and move the objects.
1 ) ( 5 pts ) Graphics Obiects: Write a graphics

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!