Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Create Picture
- *
- * @author (Hendra Ramadani 05111740000055)
- *
- * @version (0.0001)
- */
- public class Picture
- {
- private Box wall;
- private Box door;
- private Box window;
- private Box sky;
- private Triangle street;
- private Circle sun;
- private Box ground;
- private Box road;
- private Circle cloud;
- private Triangle mountain;
- /**
- * Constructor for objects of class Picture
- */
- public Picture()
- {
- // nothing to do... instance variables are automatically set to null
- }
- /**
- * Draw this picture.
- */
- public void draw()
- {
- sky = new Box();
- sky.changeColor("cyan");
- sky.moveHorizontal(-200);
- sky.moveVertical(-100);
- sky.changeWidth(1600);
- sky.changeHeight(1200);
- sky.makeVisible();
- sun = new Circle();
- sun.changeColor("yellow");
- sun.moveHorizontal(330);
- sun.moveVertical(10);
- sun.changeSize(300);
- sun.makeVisible();
- ground = new Box();
- ground.changeColor("brown");
- ground.moveHorizontal(-200);
- ground.moveVertical(150);
- ground.changeWidth(1600);
- ground.changeHeight(1200);
- ground.makeVisible();
- cloud = new Circle();
- cloud.changeColor("light blue");
- cloud.moveHorizontal(100);
- cloud.moveVertical(0);
- cloud.changeSize(45);
- cloud.makeVisible();
- cloud = new Circle();
- cloud.changeColor("light blue");
- cloud.moveHorizontal(0);
- cloud.moveVertical(0);
- cloud.changeSize(45);
- cloud.makeVisible();
- cloud = new Circle();
- cloud.changeColor("light blue");
- cloud.moveHorizontal(30);
- cloud.moveVertical(-20);
- cloud.changeSize(80);
- cloud.makeVisible();
- cloud = new Circle();
- cloud.changeColor("light blue");
- cloud.moveHorizontal(720);
- cloud.moveVertical(0);
- cloud.changeSize(45);
- cloud.makeVisible();
- cloud = new Circle();
- cloud.changeColor("light blue");
- cloud.moveHorizontal(815);
- cloud.moveVertical(0);
- cloud.changeSize(45);
- cloud.makeVisible();
- cloud = new Circle();
- cloud.changeColor("light blue");
- cloud.moveHorizontal(750);
- cloud.moveVertical(-20);
- cloud.changeSize(80);
- cloud.makeVisible();
- mountain = new Triangle();
- mountain.changeColor("green");
- mountain.moveHorizontal(220);
- mountain.moveVertical(10);
- mountain.changeSize(200, 675);
- mountain.makeVisible();
- mountain = new Triangle();
- mountain.changeColor("green");
- mountain.moveHorizontal(680);
- mountain.moveVertical(10);
- mountain.changeSize(200, 680);
- mountain.makeVisible();
- street = new Triangle();
- street.changeColor("black");
- street.moveHorizontal(450);
- street.moveVertical(210);
- street.changeSize(1000, 1500);
- street.makeVisible();
- ground = new Box();
- ground.changeColor("white");
- ground.moveHorizontal(440);
- ground.moveVertical(200);
- ground.changeWidth(5);
- ground.changeHeight(20);
- ground.makeVisible();
- ground = new Box();
- ground.changeColor("white");
- ground.moveHorizontal(440);
- ground.moveVertical(240);
- ground.changeWidth(5);
- ground.changeHeight(30);
- ground.makeVisible();
- ground = new Box();
- ground.changeColor("white");
- ground.moveHorizontal(440);
- ground.moveVertical(290);
- ground.changeWidth(5);
- ground.changeHeight(30);
- ground.makeVisible();
- ground = new Box();
- ground.changeColor("white");
- ground.moveHorizontal(440);
- ground.moveVertical(350);
- ground.changeWidth(5);
- ground.changeHeight(30);
- ground.makeVisible();
- ground = new Box();
- ground.changeColor("white");
- ground.moveHorizontal(440);
- ground.moveVertical(410);
- ground.changeWidth(5);
- ground.changeHeight(30);
- ground.makeVisible();
- ground = new Box();
- ground.changeColor("white");
- ground.moveHorizontal(440);
- ground.moveVertical(480);
- ground.changeWidth(5);
- ground.changeHeight(30);
- ground.makeVisible();
- ground = new Box();
- ground.changeColor("white");
- ground.moveHorizontal(440);
- ground.moveVertical(410);
- ground.changeWidth(5);
- ground.changeHeight(30);
- ground.makeVisible();
- ground = new Box();
- ground.changeColor("white");
- ground.moveHorizontal(440);
- ground.moveVertical(470);
- ground.changeWidth(5);
- ground.changeHeight(30);
- ground.makeVisible();
- ground = new Box();
- ground.changeColor("white");
- ground.moveHorizontal(440);
- ground.moveVertical(540);
- ground.changeWidth(5);
- ground.changeHeight(40);
- ground.makeVisible();
- ground = new Box();
- ground.changeColor("white");
- ground.moveHorizontal(440);
- ground.moveVertical(610);
- ground.changeWidth(5);
- ground.changeHeight(40);
- ground.makeVisible();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment