예제 #1
0
        static void Main(string[] args)
        {
            EasyCleaning    easyClean    = new EasyCleaning();
            UsualCleaning   usualClean   = new UsualCleaning();
            GeneralCleaning generalClean = new GeneralCleaning();

            HouseKeeper hk = new HouseKeeper(2);

            if (hk.Time < 1)
            {
                hk.cleaning = easyClean;
            }
            else if (hk.Time > 6)
            {
                hk.cleaning = generalClean;
            }
            else
            {
                hk.cleaning = usualClean;
            }

            hk.Request();
            Console.ReadKey();
        }
예제 #2
0
 public override void DoWork(HouseKeeper woman)
 {
     Console.WriteLine("Wet cleaning, washing windows");
 }
예제 #3
0
 public override void DoWork(HouseKeeper woman)
 {
     Console.WriteLine("Fold things, sweep the floor");
 }
예제 #4
0
 public override void DoWork(HouseKeeper woman)
 {
     Console.WriteLine("Wipe off dust, use a vacuum cleaner");
 }
예제 #5
0
 public abstract void DoWork(HouseKeeper woman);