Adventures in OOP (Object Oriented Programming)
summary
A PHP-coded Pokemon demo shows how a basic Pokemon class with a constructor and attack method becomes specialized via extends into Electric/Water subclasses and a Pikachu override, then how a Pokemon interface enforces getName/getType/attack/getStrength/getWeakness so no generic, typeless Pokemon is instantiated. A reusable evolution trait adds evolvesTo and evolve() to Poliwhirl without multiple inheritance. Code runs as a clear, working walkthrough of classes, inheritance, interfaces and traits.
AI-written summary · about
chapters (8)
- 0:00Introduction to OOP
- 0:55Understanding Classes
- 2:34Creating and Using Objects
- 3:41Inheritance Concepts
- 5:00Strategic Battling
- 6:20Implementing Interfaces
- 8:02Using Traits
- 9:55Q&A and Drupal Context
related talks
33mOOP - The Pokemon Journey
01h 03mDemystifying Object Oriented Programming
42mBeyond OOP: Developing PHP Extensions ... in PHP!
36mAn Introduction to OOP, Design Patterns, and TDD
32mThe Evolution of Object-Oriented Programming
22musing Pokemon to catch all code smells
42mLearning Empathy From Pokemon Blue
26mPHP, Under The Hood
