public class RedheadDuck extends java.lang.Object implements Quackable
Modifier and Type | Field and Description |
---|---|
(package private) Observable |
observable |
Constructor and Description |
---|
RedheadDuck() |
Modifier and Type | Method and Description |
---|---|
void |
notifyObservers() |
void |
quack() |
void |
registerObserver(Observer observer) |
java.lang.String |
toString() |
Observable observable
public RedheadDuck()
public void registerObserver(Observer observer)
registerObserver
in interface QuackObservable
public void notifyObservers()
notifyObservers
in interface QuackObservable
public java.lang.String toString()
toString
in class java.lang.Object