Csc.216/s08/nurture strength: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
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 | 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 (the base class), and then extend that object and its functionality in further classes (derived class). 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. 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. |
Revision as of 02:59, 16 April 2008
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 (the base class), and then extend that object and its functionality in further classes (derived class). 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. 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.