CS 1620 - Spring 2000
                                     Assignment#1: A java cup

                                                                        
 

Using the following methods of the class Graphics(see below), write an applet to draw a java cup(see figure below).
setColor(c):
set the color of the drawing to c. The argument c is of type Color, a java class.
e.g. : Color.black sets the color of the drawing to the color black $\ldots$ etc.
drawOval(x,y,w,h):
draws an oval with width w and height h at (x,y).
 
fillOval(x,y,w,h):
draws and fills an oval with the actual color(see figure  below).
 
fillRect(x,y,w,h):
draws and fills(with the actual color) a rectangle with width w and height h at (x,y).
 
drawLine(x,y,x2,y2):
draws a line between (x,y) and (x2,y2) .
All the arguments are in pixels.


Malek Mouhoub

1/19/2000