Composition
Composition is a concept in object-oriented programming where a class is made up of other classes. This allows for code reuse and flexibility, as a class can be composed of multiple classes that each have their own specific functionality. For example, a Car class can be composed of a Wheel class, an Engine class, and a Door class, each with their own methods and attributes. This allows the Car class to have all of the functionality of its composed classes without having to duplicate code.
Explain composition like I'm five
Composition is like making a new toy by combining different parts from other toys. The new toy can do all the things that the parts can do, but it's even better because it can do them all at the same time.