shCode

Module 2.2Object-Oriented Programming

Quarter 2 · Weeks 12 · Environment: q5play

Lessons in this module

Estimated: ~6 hr 18 min

  1. Slides2.2.1Slides — Object-Oriented Programming~25 min
  2. Video2.2.2Video — What `new Sprite()` actually does~4 min
  3. Reading2.2.3Reading — Class and instance~12 min
  4. Reading2.2.3aReading — The `new` operator~6 min
  5. Reading2.2.3bReading — `constructor` and its parameters~6 min
  6. Worked Example2.2.4Worked Example — You've been using classes~10 min
  7. Reading2.2.4aReading — Properties: data on `this`~6 min
  8. Q5 Lesson2.2.4bLab — Read a property~5 min
  9. Q5 Lesson2.2.4cLab — Write a property~5 min
  10. Q5 Lesson2.2.4dLab — Two sprites, two property values~8 min
  11. Reading2.2.5Reading — `this` is a noun~6 min
  12. Worked Example2.2.5aWorked Example — `this` is a pronoun~8 min
  13. Q5 Lesson2.2.6Your Turn — Build a Sprite~15 min
  14. Worked Example2.2.6aWorked Example — Sprite Showcase~12 min
  15. Video2.2.7Video — The `this` keyword~3 min
  16. Reading2.2.7aReading — Methods: functions that live on a class~6 min
  17. Q5 Lesson2.2.7bLab — Method with no params~8 min
  18. Q5 Lesson2.2.7cLab — Method with parameters~8 min
  19. Q5 Lesson2.2.7dLab — Method that returns a value~8 min
  20. Q5 Lesson2.2.7eLab — A method calling `this.otherMethod()`~8 min
  21. Reading2.2.7fReading — Why `this.sprite`, not `extends Sprite`~6 min
  22. Q5 Lesson2.2.7gLab — Mutate `this.sprite.x` from a method~8 min
  23. Q5 Lesson2.2.7hLab — Cleanup with `this.sprite.delete()`~6 min
  24. Worked Example2.2.8Worked Example — Write an Enemy class (integration)~15 min
  25. Q5 Lesson2.2.8aLab — Three Enemies in three variables~6 min
  26. Q5 Lesson2.2.8bLab — An array of Enemies~8 min
  27. Q5 Lesson2.2.8cLab — Loop over an array of instances~8 min
  28. Reading2.2.9Reading — Parallel Arrays vs Classes~10 min
  29. Worked Example2.2.10Worked Example — Procedural vs OOP side-by-side~15 min
  30. Reading2.2.10aReading — When to reach for OOP (3-question checklist)~6 min
  31. Assignment2.2.11Collectible Class~45 min
  32. Assignment2.2.12Procedural vs OOP Writeup~40 min
  33. Reading2.2.12aReading — Encapsulation, inheritance, polymorphism (vocabulary only)~6 min
  34. Challenge2.2.13Challenges~30 min