Beispiel #1
0
        private static void Main()
        {
            int commandsCount = int.Parse(Console.ReadLine());

            ShoppingCenterManager shoppingCenterManager = new ShoppingCenterManager();
            CommandProcessor      commandProcessor      = new CommandProcessor(shoppingCenterManager);

            StringBuilder resultBuilder = new StringBuilder();

            for (int i = 0; i < commandsCount; i++)
            {
                Command command = Command.Parse(Console.ReadLine());
                commandProcessor.Process(command, resultBuilder);
            }

            Console.Write(resultBuilder);
        }
Beispiel #2
0
 public CommandProcessor(ShoppingCenterManager shoppingCenterManager)
 {
     this.shoppingCenterManager = shoppingCenterManager;
 }