import java.awt.Color; import graphics.canvas; public class Stroke { // common data members // private: nobody but the current class has access // protected: keeps access to family protected int cx, cy; protected int size; // for now, radius for Circular, length for Square protected boolean filled; private Color color; public Stroke(int x, int y, int s, boolean f) { this(x, y, s, f, canvas.randomColor()); } public Stroke(int x, int y, int s, boolean f, Color c) { cx = x; cy = y; size = s; filled = f; color = c; } public Color getColor() { return color; } public void draw() { // default behavior canvas.drawCircle(cx, cy, size, color); } }