What is Delegation, versus inheritence, examples in C or C++  
Author Message
Anonymous-Remailer





PostPosted: 2004-4-16 6:52:00 Top

java-programmer, What is Delegation, versus inheritence, examples in C or C++ "Bernard" <email***@***.com> wrote:

> I apologize if this has been brought up here before.
> Searching through the newsgroup I found variants of
> my question, but not exactly what I am thinking about.
>
> I am trying to learn UML from a well publicized book,
> "Instant UML" Wrox press by Pierre-Alain Muller.
>
> While I may admire the book for its conciseness, I
> have difficulty following its examples and explanation
> of Delegation. He explains Delegation mechanism by
> a diagram of client communicates with an interface that
> propagates questions to one or more delegates. It is
> not clear but is on page 53. Next page he has some
> discussion of the "covariance problem" which he discusses
> earlier but never defines, leaving a vague understanding.
> On p54, he also has example of how inheritence is simulated
> by hand using delegation and talks of X-windows which is
> written "entirely in C". There is no example. Where
> ever I was able to understand his discussion, it was
> due to prior knowledge of the field. If some kind
> soul has been able to follow this book and can give
> explanations with reference to page numbers that would
> be very nice.
>
> Thanks++,

I looked for your concept of "Delegation" in the only book that I have
on UML. This is by Craig Larman. Its index does not evennnnn list it.

You should expand your query to other language groups. I can do it
for you. OOP implementation questions have been asked there before

Monica


 
Ian Shef





PostPosted: 2004-4-20 3:34:00 Top

java-programmer >> What is Delegation, versus inheritence, examples in C or C++ email***@***.com (Monica Litvin) wrote in
news:email***@***.com:

<SNIP>
>
> I looked for your concept of "Delegation" in the only book that I have
> on UML. This is by Craig Larman. Its index does not evennnnn list it.
>
> You should expand your query to other language groups. I can do it
> for you. OOP implementation questions have been asked there before
<SNIP>

For a start, see
http://www.javaworld.com/javaworld/javaqa/2001-09/01-qa-0914-delegate.html


--
Ian Shef 805/F6 * These are my personal opinions
Raytheon Company * and not those of my employer.
PO Box 11337 *
Tucson, AZ 85734-1337 *