If the circles are expected to move or change as the program executes then each one should be an object. For example, in a game where the circles represent playing pieces we need to keep track of the current location of each circle and too apply methods that move it.
Circle
Class
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.