22 lines
398 B
Java
Raw Normal View History

2014-08-23 08:47:44 +03:00
package com.iluwatar;
public class AngryState implements State {
private Mammoth mammoth;
public AngryState(Mammoth mammoth) {
this.mammoth = mammoth;
}
2014-08-23 08:47:44 +03:00
@Override
public void observe() {
System.out.println(String.format("%s is furious!", mammoth));
}
@Override
public void onEnterState() {
System.out.println(String.format("%s gets angry!", mammoth));
}
}