If the circle moves or changes size, or is added or deleted as the program runs, then it should be a software object.
Circle
ClassIf the circles are expected to move as the program executes, then each one should be an object. For example, if the circles represent playing pieces in a game each one should be an object so that it can be moved or removed from play.
class Circle { // variables // constructors // methods }
So our Circle
will be a drawing tool.
The circles drawn in the picture will merely be the traces left
behind each time the tool is used.
A start on the class is at the left.
Let us think about the variables that a Circle
needs.
At a minimum, what variables are needed for a circle?