edu.pdx.cs399J.lang
Class Duck

java.lang.Object
  extended by edu.pdx.cs399J.lang.Animal
      extended by edu.pdx.cs399J.lang.Bird
          extended by edu.pdx.cs399J.lang.Duck
All Implemented Interfaces:
Flies

public class Duck
extends Bird
implements Flies

This class represents a duck. Ducks fly.


Field Summary
 
Fields inherited from class edu.pdx.cs399J.lang.Animal
name
 
Constructor Summary
Duck(String name)
           
 
Method Summary
 void fly()
           
 String says()
          Returns the sound that this animal makes.
 
Methods inherited from class edu.pdx.cs399J.lang.Animal
getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Duck

public Duck(String name)
Method Detail

says

public String says()
Description copied from class: Animal
Returns the sound that this animal makes.

Specified by:
says in class Animal

fly

public void fly()
Specified by:
fly in interface Flies


Copyright © 2000-2009 Portland State University. All Rights Reserved.