Java™ 2 Primer Plus
By Steven Haines, Steve Potts

Table of Contents
Chapter 7.  Inheritance


Define the following classes in an inheritance hierarchy:

  • Animal

  • Dog

  • Wolf

  • Coyote

  • Cat

  • Tiger

  • Lion

Where wolves and coyotes are specializations of dogs, tigers and lions are specializations of cats, and dogs and cats are specializations of animals. Think about the different attributes and behavior of each animal and move common functionality up the inheritance hierarchy and specialized functionality down the inheritance hierarchy.


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

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net