17.D
This worksheet addresses a number of challenging misconceptions. Read closely and consider you answers thoughtfully.
(define (keeper n)
(overlay (text "Yes" n "blue")
(rectangle 400 300 "solid" "transparent")))
(big-bang 100
(to-draw keeper))
- What is the signature for the draw handler in the animation above?
- Describe in words briefly how to interpret the model. (How do you see changes visually.)
- When the animation stops, you want to change the background color to pink. Write the “win screen draw handler”.
- The model is always supposed to be a number with absolute value
between 5 and 250. Write a function
a-ok?
to use in thecheck-with
clause of the big bang. - Anastasia wants hitting a key to change to a light pink background and show “No”. What do you think about this idea? (See code below.) Explain.
(define (ana model key)
(overlay (text "No" model "blue")
(rectangle 400 300 "solid" "light pink")))
-
Amarga wants moving the mouse to the top right corner of the screen to change the font size to 18 point. Write a
check-expect
for the mouse handleramarga-m
. -
Amarga also wants moving the mouse to the middle right side of the screen to change the font size to 50 point. Write a
check-expect
that expresses this.
Last modified January 3, 2022: Ch17 work and review. (7de4614)