OOP - Composition, Components and Composites Example?

Posted by coder3 on Programmers See other posts from Programmers or by coder3
Published on 2012-04-08T18:59:26Z Indexed on 2012/04/08 23:46 UTC
Read the original article Hit count: 304

I've been reading a bit about OOP in relation to Composition, Components and Composites. I believe I understand the fundamental principle (not sure).

Can some one please provide a code example of a person or car (both have many properties) using Composition, Components and Composites. I think seeing it in code would clear up the confusion I have regarding this pattern.

Preferably in Java or PHP - many thanks!

© Programmers or respective owner

Related posts about java

Related posts about php