Picture.java applet

Implement a Picture.java applet which displays a house a tree, three flowers (not all identical), and sky with crescent moon, five or more stars and a comet. The stars must include 5-pointed, 6-pointed and 7-pointed varieties. The comet should be a white disk with lines emanating from it. Also, include a caption with some text. You may use any of the methods of the Graphics class.

Use fillPolygon (or drawPolygon) to make the stars. Use filloval to draw the moon (partially cover a white disk with a sky-colored disk to get a crescent).

For nice symmetrical stars (optional) you can use sine and cosine to determine location of the points. Xs[i]= XOffset + radius * cos(i*2*Math. Pl)/numPoints);

and something similar for ys[i]

Upload Picture.java and a screenshot of the running applet. (Your screenshot appletviewer window itself, not your whole desktop.) The screenshot should be saved as a gif or ipeg or png. Suggested dimensions: 800 pixels wide x 600 pixels high.
Powered by