-
Which of the following are legal variable names? Circle all the legal
names.
wear wolf bite fang's mark
wolf4ever FurCoat 2LitersOfBlood
-
Is your name on the test
-
Yes, it is.
-
Yes, it will be.
-
How many lines does this code draw?
int fangmarks = 2;
while (fangmarks < 10.0) {
g.drawLine(fangmarks, 10,20,30);
fangmarks = fangmarks * 2;
}
-
Write me a loop of some kind that draws ten lines. The lines should
be (1,1) to (1,99), (2,1) to (1,99), (3,1) to (1,99), (4,1) to (1,99),
......... (10,1) to (1,99).
-
How do you catch lycanthropy?
-
Get bit by a wearwolf.
-
Have wearwolf parents.
-
Date wearwolves.
-
Eating broccli.
-
Which of these statements is true?
1.The "system"
calls paint() when the screen needs to be redrawn Our code
only call repaint().
2.The "system"
calls repaint() when the screen needs to be redrawn Our code only
call paint().
3.We can call
paint() and repaint() any time we want.
4.What's the
deal with wearwolves and broccli?
-
Suppose I have an integer variable 'wolfsage'. Show me a paint
procedure that will show the value of 'wolfsage' on the screen.
I don't need a whole program. Just a paint procedure.
-
What is one difference between a while loop and a do loop?
-
What's a wearwolf's favorite food?
-
CS120 students
-
Wolfsbane
-
Small black cats that belong to evil witches
-
Broccli!!!!
-
(6 points) Write a whole program that computes 10!.
That is 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1. It should print the
answer on the screen. YOU MUST USE A LOOP!!!!!
-
(6 points) Write me a whole program that does the following.
It should draw a square wolf's face on the screen. The corners of
the wolf's face are at (100,100), (100,200), (200,100), and (200,200).
If someone clicks the mouse on the wolf's face, the face should turn red.
If they click somewhere else, the face should turn blue. The wolf's
face need not be beautiful. Just a couple of boxes/circles/whatever.