Search
Lessons (14)
- Inheritance
… Learn extends, super, method overriding, the "is-a" test, and when inheritance causes more harm than good. The …
- Composition over Inheritance
… Instead of being something through inheritance, it has the parts it needs. 📘 "Favor object composition over class inheritance …
- What Is Object-Oriented Programming?
… encapsulation, abstraction, inheritance and polymorphism](/img/oop/four-pillars.svg) Pillar In one sentence Real-life example --- --- --- Encapsulation …
- OOP Mistakes and Interview Questions
… Why "composition over inheritance"?</strong </summary Inheritance tightly couples a child to its parent's internals, can't …
- L — Liskov Substitution Principle
… So inheritance seems natural: js class Rectangle { setWidth(w) { this.width = w; } setHeight(h) { this.height = h; } area …
- JavaScript Essentials: Event Loop, Closures & this
… arrow inherits this }, }; user.greet(); // "Hi, Ana" const greet = user.greet; greet(); // ❌ this is lost: plain call const …
- Object Relationships: Association, Aggregation and Composition
… Also common in UML class diagrams: Symbol Meaning --- --- Child --\ Parent (hollow triangle) Inheritance ("is a") Class ..\ Interface (dashed …
- Reusable Modules and Clear Interfaces
… Default provider configurations can be inherited; aliased configurations require explicit wiring and appropriate configuration aliases declarations in the …
- Hash Maps & Sets
… Plain objects have inherited keys like "constructor" that can surprise you. Pattern 1: "Have I seen it before …
- Month 3: LLM Engineering (Weeks 9-12)
… Never guess. - Urgency is 1 (no rush) to 5 (must sell within 30 days). </rules <example <lead Inherited …
- Polymorphism
… polymorphism without inheritance "If it walks like a duck and quacks like a duck, it's a duck …
- JavaScript Language Fundamentals
… Abstraction Expose a small public API, hide details Inheritance Prototypes / extends (prefer composition when in doubt) Polymorphism Any …
- Behavioral Patterns II: Chain, Template, Iterator, Mediator, Memento, Visitor
… composition over inheritance. --- 3. Iterator 📺 Analogy: A TV remote's "next channel" button. You don't need to …
- Go Fundamentals
… composition instead of inheritance Go has no extends . Instead you embed one struct inside another, and its fields …