[SOLVED] Picture java applet

15.00 $

Programming resource
, Digital learning resource
Categories: ,
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (1 vote)
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.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.