CSD 340: The Week beginning Mar. 14
Test on Wednesday, March 23. It covers material from before break.
- Reading:
- Homework:
Possible programs to practice on
- Alice: The page should have an image of Alice (in Wonderland) and two buttons. Clicking
the first button should start a timer and intialize a counter. The function called by the timer
events should change the image's height and width (proportionately) and increment the counter.
After several timer events (e.g. 10) the timer should be turned off, only to be turned on
again by clicking the button. The second button is similar except that it makes Alice grow.
Uses alice.gif and Parchment.jpg
- Vanishing Cat: Tha page should have an image of a cat and a "Scram!" button. Clicking
the button should start a timer and intialize a counter. The function called by the timer events
should increment the counter and change the image's source file. When the final image is reached
the timer should be stopped and the button's text (value) should be changed to say "Come back!"
Now when the button is clicked, the counter should be decremented and the image source changed
so that the cat reappears.
Uses the images found in VanishingCatZipped.zip
- Redo the program which simulates a die being rolled a number of times entered by the user
(see the Week of February 7). This time use an array of counters rather than individual
counting variables. If you write it efficiently you should be able to eliminate many (perhaps
all) of the ifs in your code.
- I'll try to come up with some more practice suggestions later.
Due
- Monday:
Introduced radio buttons and checkboxes.
Survey.htm
- Wednesday:
Continued writing page with radio buttons and checkboxes.
Survey2.htm
- Friday:
Yahtzee
Start with this design of a page for playing the game Yahtzee
Yahtzee.htm which uses
Yahtzee2.gif,
Yahtzee3.gif,
SilverDie1.gif,
SilverDie2.gif,
SilverDie3.gif,
SilverDie4.gif,
SilverDie5.gif, and
SilverDie6.gif.
Yahtzee rules