Guidelines for Inheritance Relationships


Java™ 2 Primer Plus
By Steven Haines, Steve Potts

Table of Contents
Chapter 7.  Inheritance

The following is a list of guidelines to keep in mind when designing your inheritance relationships.

  • Always make a subclass capable of doing everything a super class can do

  • Ensure that a subclass holds all information that the super class holds

  • Add attributes and behavior to the subclass to define behavior that is more specialized than what is found in the super class

  • Move common characteristics to the super classes

  • Allow different subclasses of the same super class to do the same thing, but differently


    Java 2 Primer Plus
    Java 2 Primer Plus
    ISBN: 0672324156
    EAN: 2147483647
    Year: 2001
    Pages: 332

    Similar book on Amazon © 2008-2017.
    If you may any questions please contact us: