Back Edit Import Questions Delete

3b Compound Data

In Systematic Program Design

Questions

New Question Start Quiz
When is compound data appropriate?
Multiple choice
Given (define-struct pos (x y)), which constructor is generated?
Multiple choice
Given (define-struct pos (x y)), which selector returns the x field?
Multiple choice
What predicate is generated by (define-struct pos (x y))?
Multiple choice
What does the compound template rule contribute for a two-field struct?
Multiple choice
What is the main structural contrast between an enumeration template and a simple compound template?
Multiple choice
Why is (make-cow x dx) a good representation when both position and velocity change together?
Multiple choice
What should an on-tick function usually do with compound world data?
Multiple choice
Why should bounce behavior have tests near both screen edges?
Multiple choice
In the cow example, why is choose-image a useful helper?
Multiple choice
What should happen to a compound field that is not changed by a handler?
Multiple choice
Which statement correctly distinguishes interpretation and purpose?
Multiple choice
If render-cow both chooses an image and places it on a scene, what design clue is present?
Multiple choice
Why are compound-data examples especially useful when fields have different meanings?
Multiple choice
What is a correct simple else result for a key handler when the key should have no effect?
Multiple choice

Quiz Sessions

No quiz sessions yet.