Csc.216/s08/nurture strength

From Expertiza_Wiki
Revision as of 02:54, 16 April 2008 by Mnetheri (talk | contribs)
Jump to navigation Jump to search

Arguably one of the most powerful features of any object-oriented language is that of inheritance. This feature allows the programmer to define a basic object type, and then extend that object and its functionality in further classes. The initial class is called the base class, and the classes which extend the base class are called derived classes. The derived classes contain the same variables and functions of the original class, but allow the programmer to extend the original functionality to whatever degree is necessary, without actually changing the functionality of the original base class. This feature becomes especially powerful when one considers the possibility of multiple inheritance, which allows for several different, albeit related, derived classes which all share the same base class. This allows for several other extremely powerful features, such as polymorphism; however, these features will not be discussed in this exercise. Unfortunately, it is often the case that beginning programmers have a difficult time fully grasping the concept of inheritance, despite its applicability and usefulness. This exercise will present a fun and engaging method for representing a more concrete example of the inheritance process, and will hopefully lead to a more comprehensive understanding of the inheritance process.