Lesson 18: Projecting a little class
Outline:
- Mini-quiz
- An example program: a physics simulation
- projectile position
- inputs and initial state
- updating the state (position and velocity)
- Refactoring for modularity
- using functions
- Exercise 1
- using a (not-yet-existing)
Projectile
class instead
- Object-oriented programming (OOP)
- the
Projectile
constructor: Exercise 2 - updating the state, revisited: Exercise 3
- the
- 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)