tips.polymorph
Class Pet

java.lang.Object
  extended bytips.polymorph.Pet
Direct Known Subclasses:
Dog

class Pet
extends java.lang.Object

A Pet base class for the purposes of this little test. This class has some pet like features

TODO In the real world Pet should be abstract


Field Summary
(package private)  int nAmount
           
 
Constructor Summary
Pet()
          Create a Pet
 
Method Summary
 Pet eat()
          A bad function....
 void petFunction()
           
 void scratch()
          Our Pet is scratching
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nAmount

int nAmount
Constructor Detail

Pet

public Pet()
Create a Pet

Method Detail

petFunction

public void petFunction()

scratch

public void scratch()
Our Pet is scratching

Returns:
None

eat

public Pet eat()
A bad function....

Returns:
Pet a pointer to ourselves