PPT Slide
Subclasses
(Human extends Animal
i.e. “A human is an animal” or
“All humans are animals”)
class Human extends Animal {
public Human() {
strNoise = “I think therefore I am”;
} // of constructor
public void doYourThing ( ) {
identifySelf();
System.out.println
(“I am a sentient being”);
System.out.println(strNoise);
} // of doYourThing
} // of Human
Previous slide
Next slide
Back to first slide
View graphic version