moock.org is supported in part by


March 22, 2007

Chapter 6, Paragraphs 1-3, Essential ActionScript 3.0

Here are the first 3 paragraphs of Chapter 6 of Essential ActionScript 3.0

6. Inheritance

In object-oriented programming, inheritance is a formal relationship between two or more classes, wherein one class borrows (or inherits) the variable and method definitions of another class. In the practical, technical sense, inheritance simply lets one class make use of the code in another class.

But the term inheritance implies much more than code reuse. Inheritance is as much an intellectual tool as it is a technical tool. It lets programmers conceptualize a group of classes in hierarchical terms. In biology, inheritance is a genetic process through which one living creature passes on traits to another. You are said to have inherited your motherís eyes or your fatherís nose, even though you donít look exactly like either of your parents. In object-oriented programming, inheritance has a similar connotation. It lets a class look and feel in many ways like another class, while adding its own unique features.

This chapter begins by examining the syntax and general use of inheritance. Once we understand inheritance on a practical level, weíll consider its benefits and alternatives. Finally, weíll apply inheritance to our virtual zoo program.

Posted by moock at March 22, 2007 07:03 PM