Csc.216/s08/nurture strength

From Expertiza_Wiki
Revision as of 03:02, 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 (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.

    • NOTE: The base object used in this example will be a car; however, you can make your base class anything that you want, as long as it is within the scope of the exercise.
   (1)