Study guide: Build a Paper Interactive Story
Design a paper story with Menu/play=Forest, Forest/home=Menu and a Read control. Test both links and the read response, reporting expected and actual results.
Ideas to explain in your own words
- An event is something a program notices, such as a click or key press. An event handler describes the response. A program should distinguish events so one control does not unexpectedly perform another control’s job. The supplied handler table is a paper model; it runs no real code.
- Interactive stories can connect scenes through links. A scene table specifies the destination of each choice. The learner must use the current scene and chosen link together. The same word may lead somewhere else from another scene, so context matters.
- State is information a program keeps about its current situation. A story can store a chosen item and later describe it. Our model replaces the held item whenever Take runs; Look reports the held item without changing it. This is different from storing every past item.
- Testing checks whether a program’s observed response meets its intended behavior. A paper story test states the event, expected response and actual response. A mismatch names a specific defect. A passing single case supports that case; it does not prove every route works.
Useful vocabulary
- event
- An action or occurrence a program responds to.
- handler
- The response assigned to an event.
- state
- Information about the current program situation.
Watch your reasoning
- The response to one button does not automatically run for every event.
- Do not use a link destination from a different scene.
- Do not assume a single current-item field keeps a list of all earlier items.
- A nice-looking screen does not prove its links and controls work.
A worked review example
Event Start. Handlers: Start opens story; Back opens menu; Read plays voice; Help shows steps. What response runs? The supported answer is Open story. Look up the exact event in the handler table and apply only its stated response. The response to one button does not automatically run for every event. Back expected Menu and actually opens Menu. Classify the paper test. The supported answer is Passes this case. Compare the actual response with the expectation for the same event. A nice-looking screen does not prove its links and controls work. Testing checks whether a program’s observed response meets its intended behavior.
Make a practice plan
- Draw or tell one computing idea from each of the four lessons. Give one example of using each idea.
- Use the example to explain one mistake to avoid.
- Try the unit review before opening the explanations.
- Try the new task on paper or say your answer. Then compare your steps with the example answer.