Karen NorthWestside HSpre-AP Computer Science I Lesson Section 7.1

LEARNER OBJECTIVES:
  1. TLW Distinguish between different types of data
  2. TLW Design functions for mixed data
PROCEDURES/ACTIVITIES:
  1. Explain terms/concepts:
    • Subclasses of data
    • Mixed data
    • Class input belongs
    • Bad use of data
    • Protection
    • PREDICATE
  2. List the predicates for classes of data that we know.
  3. What does struct? consume and produce?
  4. For each structure definition you write, Scheme introduces constructors, selectors and what else?
  5. Write a data definition for a pixel where it is either a number or a posn.
  6. Write a proram that finds the distance-to-0 that consumes a pixel with mixed data.
ASSESSMENT:
  • Exercise 7.1.1
  • Program Set 7.1: Exercise 7.1.2, 7.1.3