CS 120A Fall
2001,
Instructor: Jeffrey Horn QUIZ
1: Take-Home
Name: _____________________
handed
out Monday, Nov. 5, 2001
due Wednesday, Nov. 7, 2001 (end-of-day) in my dept. mailbox, or fax (227-2020), or email, or WebCT, or whatever
int n;
n = 2;
while (n < 100
{ n = n*4;
g.drawString(20,n,"The current value of n is" + n);
};
// "paintMonster(x,y,size)" draws a way cool monster centered at position
// x,y in the window of Graphics object g, making the monster of size "size"
// which is actually about "size" pixels wide, and 2 * size pixels high.
// (x,y, and size are all int's here, and the unit is pixels.)
private void paintMonster(Graphics g, int x, int y, int size)
{ //assume this part is written, details don't matter!
}