diff --git a/Picture.java b/Picture.java deleted file mode 100644 index 855db14..0000000 --- a/Picture.java +++ /dev/null @@ -1,85 +0,0 @@ - -/** - * This class represents a simple picture. You can draw the picture using - * the draw method. But wait, there's more: being an electronic picture, it - * can be changed. You can set it to black-and-white display and back to - * colors (only after it's been drawn, of course). - * - * This class was written as an early example for teaching Java with BlueJ. - * - * @author Michael Kölling and David J. Barnes - * @version 1.1 (24 May 2001) - */ -public class Picture -{ - private Square wall; - private Square window; - private Triangle roof; - private Circle sun; - private Circle circle1; - private Square square1; - - /** - * Constructor for objects of class Picture - */ - public Picture() - { - // nothing to do... instance variables are automatically set to null - } - - /** - * Draw this picture. - */ - public void draw() - { - - - circle1 = new Circle(); - circle1.changeColor("blue"); - circle1.moveHorizontal(150); - circle1.moveVertical(0); - circle1.changeSize(60); - circle1.makeVisible(); - - square1=new Square(); - square1.changeColor("green"); - square1.moveHorizontal(30); - square1.moveVertical(50); - square1.makeVisible(); - } - - /** - * Change this picture to black/white display - */ - public void setBlackAndWhite() - { - if(wall != null) // only if it's painted already... - { - wall.changeColor("black"); - window.changeColor("white"); - roof.changeColor("black"); - sun.changeColor("black"); - } - } - - /** - * Change this picture to use color display - */ - public void setColor() - { - if(wall != null) // only if it's painted already... - { - wall.changeColor("red"); - window.changeColor("black"); - roof.changeColor("green"); - sun.changeColor("yellow"); - } - } - - public static void main(String[] args) { - Picture picture = new Picture(); -// picture.setBlackAndWhite(); - picture.draw();; - } - -}