Ramblings

November 11, 2006

Inheritance vs Composition

Filed under: flash — michaelangela @ 2:02 pm

Colin Moock on inheritance vs. composition for OOP

moock>> composition vs inheritance, from essential actionscript 2.0 (eas2)

Composition, an alternative form of inter-object relationship, often competes with inheritance as an OOP design technique. In composition, one class (the “front end class”) stores an instance of another class (the “back end class”) in an instance property. The front end class delegates work to the back end class by invoking methods on that instance.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: