document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /**
  2. * Create Picture
  3. *
  4. * @author (Hendra Ramadani 05111740000055)
  5. *
  6. * @version (0.0001)
  7. */
  8. public class Picture
  9. {
  10. private Box wall;
  11. private Box door;
  12. private Box window;
  13. private Box sky;
  14. private Triangle street;
  15. private Circle sun;
  16. private Box ground;
  17. private Box road;
  18. private Circle cloud;
  19. private Triangle mountain;
  20. /**
  21. * Constructor for objects of class Picture
  22. */
  23. public Picture()
  24. {
  25. // nothing to do... instance variables are automatically set to null
  26. }
  27. /**
  28. * Draw this picture.
  29. */
  30. public void draw()
  31. {
  32. sky = new Box();
  33. sky.changeColor("cyan");
  34. sky.moveHorizontal(-200);
  35. sky.moveVertical(-100);
  36. sky.changeWidth(1600);
  37. sky.changeHeight(1200);
  38. sky.makeVisible();
  39.  
  40. sun = new Circle();
  41. sun.changeColor("yellow");
  42. sun.moveHorizontal(330);
  43. sun.moveVertical(10);
  44. sun.changeSize(300);
  45. sun.makeVisible();
  46.  
  47. ground = new Box();
  48. ground.changeColor("brown");
  49. ground.moveHorizontal(-200);
  50. ground.moveVertical(150);
  51. ground.changeWidth(1600);
  52. ground.changeHeight(1200);
  53. ground.makeVisible();
  54.  
  55. cloud = new Circle();
  56. cloud.changeColor("light blue");
  57. cloud.moveHorizontal(100);
  58. cloud.moveVertical(0);
  59. cloud.changeSize(45);
  60. cloud.makeVisible();
  61. cloud = new Circle();
  62. cloud.changeColor("light blue");
  63. cloud.moveHorizontal(0);
  64. cloud.moveVertical(0);
  65. cloud.changeSize(45);
  66. cloud.makeVisible();
  67. cloud = new Circle();
  68. cloud.changeColor("light blue");
  69. cloud.moveHorizontal(30);
  70. cloud.moveVertical(-20);
  71. cloud.changeSize(80);
  72. cloud.makeVisible();
  73. cloud = new Circle();
  74. cloud.changeColor("light blue");
  75. cloud.moveHorizontal(720);
  76. cloud.moveVertical(0);
  77. cloud.changeSize(45);
  78. cloud.makeVisible();
  79. cloud = new Circle();
  80. cloud.changeColor("light blue");
  81. cloud.moveHorizontal(815);
  82. cloud.moveVertical(0);
  83. cloud.changeSize(45);
  84. cloud.makeVisible();
  85. cloud = new Circle();
  86. cloud.changeColor("light blue");
  87. cloud.moveHorizontal(750);
  88. cloud.moveVertical(-20);
  89. cloud.changeSize(80);
  90. cloud.makeVisible();
  91.  
  92. mountain = new Triangle();
  93. mountain.changeColor("green");
  94. mountain.moveHorizontal(220);
  95. mountain.moveVertical(10);
  96. mountain.changeSize(200, 675);
  97. mountain.makeVisible();
  98.  
  99. mountain = new Triangle();
  100. mountain.changeColor("green");
  101. mountain.moveHorizontal(680);
  102. mountain.moveVertical(10);
  103. mountain.changeSize(200, 680);
  104. mountain.makeVisible();
  105.  
  106. street = new Triangle();
  107. street.changeColor("black");
  108. street.moveHorizontal(450);
  109. street.moveVertical(210);
  110. street.changeSize(1000, 1500);
  111. street.makeVisible();
  112.  
  113. ground = new Box();
  114. ground.changeColor("white");
  115. ground.moveHorizontal(440);
  116. ground.moveVertical(200);
  117. ground.changeWidth(5);
  118. ground.changeHeight(20);
  119. ground.makeVisible();
  120.  
  121. ground = new Box();
  122. ground.changeColor("white");
  123. ground.moveHorizontal(440);
  124. ground.moveVertical(240);
  125. ground.changeWidth(5);
  126. ground.changeHeight(30);
  127. ground.makeVisible();
  128.  
  129. ground = new Box();
  130. ground.changeColor("white");
  131. ground.moveHorizontal(440);
  132. ground.moveVertical(290);
  133. ground.changeWidth(5);
  134. ground.changeHeight(30);
  135. ground.makeVisible();
  136.  
  137. ground = new Box();
  138. ground.changeColor("white");
  139. ground.moveHorizontal(440);
  140. ground.moveVertical(350);
  141. ground.changeWidth(5);
  142. ground.changeHeight(30);
  143. ground.makeVisible();
  144.  
  145. ground = new Box();
  146. ground.changeColor("white");
  147. ground.moveHorizontal(440);
  148. ground.moveVertical(410);
  149. ground.changeWidth(5);
  150. ground.changeHeight(30);
  151. ground.makeVisible();
  152.  
  153. ground = new Box();
  154. ground.changeColor("white");
  155. ground.moveHorizontal(440);
  156. ground.moveVertical(480);
  157. ground.changeWidth(5);
  158. ground.changeHeight(30);
  159. ground.makeVisible();
  160.  
  161. ground = new Box();
  162. ground.changeColor("white");
  163. ground.moveHorizontal(440);
  164. ground.moveVertical(410);
  165. ground.changeWidth(5);
  166. ground.changeHeight(30);
  167. ground.makeVisible();
  168.  
  169. ground = new Box();
  170. ground.changeColor("white");
  171. ground.moveHorizontal(440);
  172. ground.moveVertical(470);
  173. ground.changeWidth(5);
  174. ground.changeHeight(30);
  175. ground.makeVisible();
  176.  
  177. ground = new Box();
  178. ground.changeColor("white");
  179. ground.moveHorizontal(440);
  180. ground.moveVertical(540);
  181. ground.changeWidth(5);
  182. ground.changeHeight(40);
  183. ground.makeVisible();
  184.  
  185. ground = new Box();
  186. ground.changeColor("white");
  187. ground.moveHorizontal(440);
  188. ground.moveVertical(610);
  189. ground.changeWidth(5);
  190. ground.changeHeight(40);
  191. ground.makeVisible();
  192. }
  193. }
');