package state.ts2;

/**
 * This class implements the actions of a turnstile.
 *
 * @author fpereira
 */
public class TurnstileMachineImpl implements TurnstileMachineInterface {
  /**
   * This method closes the turnstile, so that nobody else can pass through it.
   */
  public final void lock() {
    System.out.println("Locking turnstile.");
  }

  /**
   * This method unlocks the turnstile, so that someone can go across it.
   */
  public final void unlock() {
    System.out.println("Unlocking turnstile");
  }

  /**
   * This method sounds an alarm. It may happen, for instance, when someone
   * tries to pass the turnstile when it is locked.
   */
  public final void alarm() {
    System.out.println("Sounding alarm");
  }

  /**
   * This method lights a "thank you" message to the user.
   */
  public final void thankyou() {
    System.out.println("Thank you, very much!");
  }

}
