Back Summary

Session #20

Multiple choice: 15/15 correct ยท Short answer: 0/0 answered · completed Sep 14, 2026

Answers

What should you identify during HtDW domain analysis?

✓ Constants, changing information, and required event/output behavior

What does the world-state data definition represent?

✓ All information that changes while the program runs

Which big-bang option installs a keyboard handler?

✓ on-key

What is the standard signature for an on-tick handler?

✓ WorldState -> WorldState

What is the standard signature for a to-draw handler?

✓ WorldState -> Image

What is the normal parameter order for a key handler?

✓ WorldState then KeyEvent

Why are wish-list stubs needed before all handlers are implemented?

✓ big-bang must be able to resolve the handler function names

How are an HtDF stub and an HtDW wish-list stub similar?

✓ Both provide temporary callable scaffolding before the real implementation exists

Conceptually, what happens after on-tick produces a new world state?

✓ to-draw can render the latest state as an image

What is white-box testing for a KeyEvent handler?

✓ Choosing tests based on the distinct branches the handler implementation has

A key handler changes the world only for the space key. What is a sensible minimal branch-focused test set?

✓ Space and one representative non-space key

If unrelated keys should do nothing, what should the handler usually return in its else branch?

✓ The unchanged world state

Why is an expectation such as (+ 3 SPEED) often better than hardcoding 6?

✓ It documents the intended computation and stays correct if SPEED changes

What does traceability mean in the HtDW recipe?

✓ Names and design elements in code correspond clearly to items identified in the analysis

When adding a new key-controlled behavior to a world program, what should happen first?

✓ Update the analysis/wish list and then design the handler systematically