Here is the definition of whole-part composition. http://en.wikipedia.org/wiki/Object_composition And here is the inheritance. http://en.wikipedia.org/wiki/Inheritance_%28object-oriented_programming%29
I have encountered a question today and I can not solve. Assume that we have a software plan about a software that we are about to build. My question is, in which circumstances existing inheritance relation between two class turn into composition? It sounds weird, but I can not answer it. Thanks in advance.