public class Flock extends java.lang.Object implements Quackable
Constructor and Description |
---|
Flock() |
Modifier and Type | Method and Description |
---|---|
void |
add(Quackable duck) |
void |
notifyObservers() |
void |
quack() |
void |
registerObserver(Observer observer) |
java.lang.String |
toString() |
public Flock()
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