Quiz App
Decks
Folders
Back
Summary
{deck: {name: "3a How to Design Worlds"}, score: [{question_type: "multiple_choice", label: "Multiple choice", graded: true, count: 15, total: 15}, {question_type: "short_answer", label: "Short answer", graded: false, count: 0, total: 0}], answers: [{question_prompt: "What should you identify during HtDW domain analysis?", question_type: "multiple_choice", choices: ["Constants, changing information, and required event/output behavior", "Only the final function body", "Only the keyboard keys", "Only the image library"], selected_choice: "Constants, changing information, and required event/output behavior", response: nil, correct: true}, {question_prompt: "What does the world-state data definition represent?", question_type: "multiple_choice", choices: ["Only the screen size", "All information that changes while the program runs", "Only constants", "The DrRacket settings"], selected_choice: "All information that changes while the program runs", response: nil, correct: true}, {question_prompt: "Which big-bang option installs a keyboard handler?", question_type: "multiple_choice", choices: ["key-press", "to-key", "on-key", "handle-key"], selected_choice: "on-key", response: nil, correct: true}, {question_prompt: "What is the standard signature for an on-tick handler?", question_type: "multiple_choice", choices: ["WorldState -> Image", "KeyEvent -> WorldState", "Image -> WorldState", "WorldState -> WorldState"], selected_choice: "WorldState -> WorldState", response: nil, correct: true}, {question_prompt: "What is the standard signature for a to-draw handler?", question_type: "multiple_choice", choices: ["Image -> WorldState", "WorldState KeyEvent -> Image", "WorldState -> Image", "WorldState -> Boolean"], selected_choice: "WorldState -> Image", response: nil, correct: true}, {question_prompt: "What is the normal parameter order for a key handler?", question_type: "multiple_choice", choices: ["KeyEvent then WorldState", "WorldState then KeyEvent", "Image then KeyEvent", "KeyEvent only"], selected_choice: "WorldState then KeyEvent", response: nil, correct: true}, {question_prompt: "Why are wish-list stubs needed before all handlers are implemented?", question_type: "multiple_choice", choices: ["big-bang must be able to resolve the handler function names", "They make the program faster", "They automatically generate tests", "They remove the need for a world data definition"], selected_choice: "big-bang must be able to resolve the handler function names", response: nil, correct: true}, {question_prompt: "How are an HtDF stub and an HtDW wish-list stub similar?", question_type: "multiple_choice", choices: ["Both are permanent optimized implementations", "Both define a new primitive", "Both eliminate the need for examples", "Both provide temporary callable scaffolding before the real implementation exists"], selected_choice: "Both provide temporary callable scaffolding before the real implementation exists", response: nil, correct: true}, {question_prompt: "Conceptually, what happens after on-tick produces a new world state?", question_type: "multiple_choice", choices: ["The new state is discarded", "to-draw can render the latest state as an image", "Every key event is replayed", "The program terminates"], selected_choice: "to-draw can render the latest state as an image", response: nil, correct: true}, {question_prompt: "What is white-box testing for a KeyEvent handler?", question_type: "multiple_choice", choices: ["Choosing tests based on the distinct branches the handler implementation has", "Testing every possible key on the keyboard", "Testing only the main function", "Ignoring the else branch"], selected_choice: "Choosing tests based on the distinct branches the handler implementation has", response: nil, correct: true}, {question_prompt: "A key handler changes the world only for the space key. What is a sensible minimal branch-focused test set?", question_type: "multiple_choice", choices: ["Only space", "Every Unicode character", "Space and one representative non-space key", "No tests because KeyEvent is predefined"], selected_choice: "Space and one representative non-space key", response: nil, correct: true}, {question_prompt: "If unrelated keys should do nothing, what should the handler usually return in its else branch?", question_type: "multiple_choice", choices: ["empty-image", "false", "A new random world state", "The unchanged world state"], selected_choice: "The unchanged world state", response: nil, correct: true}, {question_prompt: "Why is an expectation such as (+ 3 SPEED) often better than hardcoding 6?", question_type: "multiple_choice", choices: ["It documents the intended computation and stays correct if SPEED changes", "It prevents SPEED from being evaluated", "It turns SPEED into a parameter", "It makes the test always pass"], selected_choice: "It documents the intended computation and stays correct if SPEED changes", response: nil, correct: true}, {question_prompt: "What does traceability mean in the HtDW recipe?", question_type: "multiple_choice", choices: ["Every function must print a trace", "Names and design elements in code correspond clearly to items identified in the analysis", "Only constants can be renamed", "Tests must be ordered alphabetically"], selected_choice: "Names and design elements in code correspond clearly to items identified in the analysis", response: nil, correct: true}, {question_prompt: "When adding a new key-controlled behavior to a world program, what should happen first?", question_type: "multiple_choice", choices: ["Patch only the final function body", "Delete existing handlers", "Update the analysis/wish list and then design the handler systematically", "Replace big-bang with cond"], selected_choice: "Update the analysis/wish list and then design the handler systematically", response: nil, correct: true}]}
Copy JSON