Lesson 18: Projecting a little class

Outline:

  1. Mini-quiz
  2. An example program: a physics simulation
    • projectile position
    • inputs and initial state
    • updating the state (position and velocity)
  3. Refactoring for modularity
    • using functions
    • Exercise 1
    • using a (not-yet-existing) Projectile class instead
  4. Object-oriented programming (OOP)
  5. Encapsulation and instance variables

Reading assignment (to be completed by the next class):

  • expected: Zelle sections 10.2-10.5 (pp. 314-336)
  • recommended: Zelle sections 10.6-10.8 (pp. 337-356)