Are Composition and Inheritance the same? If I want to implement the composition pattern, how can I do that in Java?
as another example, consider a car class, this would be a good use of composition, a car would "have" an engine, a transmission, tires, seats, etc. It would not extend any of those classes.