10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

InheritanceHow Polymorphism WorksAlthough classes inherit the attributes and methods of their superclasses, aninherited method may be redefined for a class to allow it to manipulate its owndefined attributes. For example, assume you have created the user classhierarchy shown in the following illustration:Every user class in the illustration has the attributes defined at its own level,as shown in the box for each user class, as well as all attributes defined by itssuperclasses. TempEmployee's attributes, therefore, are identical toEmployee's, whereas Manager and PermanentEmployee define additionalattributes.Methods defined for each class are illustrated by a brace to the right of theclass. For example, the Terminate method is defined only for the Employeeclass and inherited by all subclasses. The Hire method is defined for theEmployee class and redefined at the level of each subclass.Working with Classes 125

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!