Graphic Java

ASSIGNMENT:
Create an applet which draws twenty random shapes (with random colors). Don't worry about the reset functionality.

In order to generate random numbers you must:

  1. Import java.util.*;
  2. Create an instance of the Random class: Random r;
  3. Instantiate this instance: r = new Random();
  4. Generate a random number: int w = Math.abs(r.nextInt()%50) + 5;