/* * A program to paint 9 dots */ package npw; import java.awt.Color; import painter.SPainter; import shapes.SCircle; public class Dots { public static void main(String[] args){ SPainter Kevin = new SPainter("Dots", 1400, 1000); // Four different size circles are called Apple, Butter, Charlie, Duff. // Their sizes are 100, 50, 25, 250. // Their colors are RED, YELLOW, BLACK, BLUE. SCircle Apple = new SCircle(100); SCircle Butter = new SCircle(50); SCircle Charlie = new SCircle(25); SCircle Duff = new SCircle(250); PaintApple(Kevin,Apple); PaintButter(Kevin, Butter); PaintCharlie(Kevin, Charlie); PaintDuff(Kevin, Duff); } private static void PaintApple(SPainter Kevin, SCircle Apple){ Kevin.setColor(Color.RED); Kevin.mlt(450); Kevin.mfd(250); Kevin.paint(Apple); Kevin.moveToCenter(); Kevin.mrt(450); Kevin.mfd(250); Kevin.paint(Apple); Kevin.moveToCenter(); } private static void PaintButter(SPainter Kevin, SCircle Butter){ Kevin.setColor(Color.YELLOW); Kevin.mlt(450); Kevin.mfd(75); Kevin.paint(Butter); Kevin.moveToCenter(); Kevin.mrt(450); Kevin.mfd(75); Kevin.paint(Butter); Kevin.moveToCenter(); } private static void PaintCharlie(SPainter Kevin, SCircle Charlie){ Kevin.setColor(Color.BLUE); Kevin.mlt(450); Kevin.mbk(25); Kevin.paint(Charlie); Kevin.mbk(60); Kevin.paint(Charlie); Kevin.moveToCenter(); Kevin.mrt(450); Kevin.mbk(25); Kevin.paint(Charlie); Kevin.mbk(60); Kevin.paint(Charlie); Kevin.moveToCenter(); } private static void PaintDuff(SPainter Kevin, SCircle Duff){ Kevin.setColor(Color.BLACK); Kevin.mbk(200); Kevin.paint(Duff); Kevin.moveToCenter(); } }