继承vs Composition Inheritance and Composition are two important concepts found in OOP (Object Oriented Programming). In simple terms, both Composition and Inheritance deal with providing additional properties or behavior to a class. Inheritance is the ability for a class to inherit properties and behavior from a parent class by extending it. On the other […]