All pastes #742220 Raw Edit

Mine

public text v1 · immutable
·published 2007-10-19 10:32 UTC
rendered paste body

/**
 * This class draws a simple house.
 *
 * This class was written as an early example for teaching Java with BlueJ.
 
 
 */
public class DrawHouse
{

  /**
  * Draw a House.
  */
  public void drawHouse()
  {
    // Create the local variables needed
    Square wall;
    Square window;
    Triangle roof;
    Circle sun;
    int wallSize = 100;
    
    wall = new Square();
    wall.moveVertical(80);
    wall.changeSize(wallSize);
    wall.makeVisible();
    
    roof = new Triangle();  
    roof.changeSize((wallSize/2), (wallSize+40));
    roof.moveHorizontal(60);
    roof.moveVertical(70);
    roof.makeVisible();
    
    window = new Square();
    window.changeColour(Colour.BLACK);
    window.moveHorizontal(20);
    window.moveVertical(100);
    window.makeVisible();
    
    //Circle poo = new Circle(); 
    sun = new Circle() ;
    sun.changeColour(Colour.RED);
    sun.moveHorizontal(180);
    sun.moveVertical(-10);
    sun.changeSize(60);
    sun.makeVisible();
  //  sun.slowMoveVertical(150);
    
      
    //sun = new Circle();
    //sun.changeColour(Colour.YELLOW);
    //sun.moveHorizontal(0);
    //sun.moveVertical(-10);
    //sun.changeSize(60);
    //sun.makeVisible();
    


  }
    
  
     public void slowMoveVertical()
    { 
        
    Circle sun;
      
   // sun = Circle();
    //sun.changeColour(Colour.RED);
    //sun.moveHorizontal(180);
    //sun.moveVertical(-10);
    //sun.changeSize(60);
    //sun.makeVisible();
    sun.slowMoveVertical(150);
    }   

}