1. Mad Max

Complete the MadMax program by filling in the max method that returns the larger of its two parameters:

private int max(int i, int j)

The run method has already been written:

public void run() {
    println("The max of 4 and 5 is: " + max(4, 5));
    println("The max of -4 and 4 is: " + max(-4, 4));
    println("The max of 1 and 2 is: " + max(1, 2));
    println("The max of 0 and 0 is: " + max(0, 0));
}

Your output should look like this:

2. Draw Tree

Fill in the drawTree method that draws a tree with the base of its trunk centered at the provided (x, y) position:

private void drawTree(int x, int y)

The run method has already been written:

public void run() {
    drawTree(50, 150);
    drawTree(100, 300);
    drawTree(500, 200);
    drawTree(300, 250);
    drawTree(700, 310);
}

Each tree should have a truck with a width of 20 pixels and a height of 80 pixels. The leaves should have a radius of 30 pixels . Your output should look like this:

If you finish early see how beautiful a tree you can create. Email us a screenshot!