Since the area of a circle of radius r is pi*r^2 and the area of a square exactly containing that circle is (2r)^2, the ratio of the two areas is pi/4. If a point is picked at random (random x and y coordinates) within the square, the probability that it is in the circle is pi/4.
The Monte Carlo method is to pick a large succession of random points and count how many are in the circle. The expectation is that (number of points in circle)/(total number of points) approximates pi/4.
The project is to write an applet that displays a circle in a square, then adds random points to the picture one by one. The display should also contain the current total number of random points that have been put in the picture and the current approximation to pi. Use color appropriately. In particular, use a different color for points within the circle and for points outside (but in the square).