Content deleted Content added
Tags: Reverted Mobile edit Mobile web edit |
GTA5 GTA5 Khsunal GTA5 Khsunal GTA5 Khsunal 😎😎😎👑👑👑👑👑👑👑👑👑💔🎁🎁🎁🎁 Tags: Reverted Mobile edit Mobile web edit |
||
Line 2:
{{Cleanup bare URLs|date=August 2022}}
{{Confusing|date=October 2015}}
[[File:UML diagram of composition over inheritance.svg|thumb|right|444px|This diagram shows how the fly and sound behavior of an animal can be
signed in a flexible way by using the composition over inheritance design principle.<ref name="FHDPs" />]] '''Composition over inheritance''' (or '''composite reuse principle''') in [[object-oriented programming]] (OOP) is the principle that classes should achieve [[Polymorphism (computer science)|polymorphic]] behavior and [[code reuse]] by their [[object composition|composition]] (by containing instances of other classes that implement the desired functionality) rather than [[Inheritance (computer science)|inheritance]] from a base or parent class.<ref>{{cite book
| url = https://books.google.com/books?id=4pjbgVHzomsC&q=composite+reuse+principle&pg=PA17
|