예제 #1
0
        static void Main(string[] args)
        {
            Manager  manager  = new Manager();
            WorkerIT workerIT = new WorkerIT();
            WorkerPR workerPR = new WorkerPR();

            WriteReportCommand writeReportCommandIT = new WriteReportCommand(workerIT);
            WriteReportCommand writeReportCommandPR = new WriteReportCommand(workerPR);

            PreparePresentationCommand preparePresentationCommand =
                new PreparePresentationCommand(workerPR);

            WriteCodeCommand writeCodeCommand = new WriteCodeCommand(workerIT);

            manager.setCommand(writeReportCommandIT);
            manager.orderCommand();

            manager.setCommand(preparePresentationCommand);
            manager.orderCommand();

            manager.setCommand(writeCodeCommand);
            manager.orderCommand();

            Console.ReadLine();
        }
예제 #2
0
 public WriteCodeCommand(WorkerIT w)
 {
     worker = w;
 }