예제 #1
0
        static void Main(string[] args)
        {
            WashingmMachine obj = new WashingmMachine();

            obj.Washing();
            Console.ReadKey();
        }
예제 #2
0
 public void DoAction(WashingmMachine washingMachine)
 {
     Console.WriteLine("乾燥しました。");
     washingMachine.SetState(null);
 }
예제 #3
0
 public void DoAction(WashingmMachine washingMachine)
 {
     Console.WriteLine("すすぎました。");
     washingMachine.SetState(new SpinningState());
 }
예제 #4
0
 public void DoAction(WashingmMachine washingMachine)
 {
     Console.WriteLine("脱水しました。");
     washingMachine.SetState(new DryingState());
 }