[SOLVED] SOLVED: Forest and trees.java

15.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Forest_and_Trees.zip (3.4 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (1 vote)

For this assignment, you need to write two functions.
public void drawTree( Graphics g, int x, int y )this functions must draw a tree on the screen. Use a brownish rectangle for the trunk, and a green triangle (using fillPolygon()) for the branches. You should make it so that x is the left-most part of the branches, and y is the tallest part of the tree. You should make each tree relatively small.public void drawForest( Graphics g, int x, int y, int w, int h )this functions should call the drawTree() method inside a loop in order to draw many trees within a certain region on the screen. The positions of the trees within the forest should be random, but no part of any tree should extend past the boundaries given

  • Forest_and_Trees.zip