Esempio n. 1
0
        public Engine(IReader reader, IWriter writer)
        {
            this.reader = reader;
            this.writer = writer;

            this.restaurantController = new RestaurantController();
        }
Esempio n. 2
0
        public void MoveCommand(string inputLine, RestaurantController rc)
        {
            string[] input   = inputLine.Split();
            string   command = input[0];

            switch (command)
            {
            case "AddFood":
                Console.WriteLine(rc.AddFood(input[1], input[2], decimal.Parse(input[3]))); break;

            case "AddDrink":
                Console.WriteLine(rc.AddDrink(input[1], input[2], int.Parse(input[3]), input[4])); break;

            case "AddTable":
                Console.WriteLine(rc.AddTable(input[1], int.Parse(input[2]), int.Parse(input[3]))); break;

            case "ReserveTable":
                Console.WriteLine(rc.ReserveTable(int.Parse(input[1]))); break;

            case "OrderFood":
                Console.WriteLine(rc.OrderFood(int.Parse(input[1]), input[2])); break;

            case "OrderDrink":
                Console.WriteLine(rc.OrderDrink(int.Parse(input[1]), input[2], input[3])); break;

            case "LeaveTable":
                Console.WriteLine(rc.LeaveTable(int.Parse(input[1]))); break;

            case "GetFreeTablesInfo":
                Console.WriteLine(rc.GetFreeTablesInfo()); break;

            case "GetOccupiedTablesInfo":
                Console.WriteLine(rc.GetOccupiedTablesInfo()); break;

            default: break;
            }
        }
Esempio n. 3
0
 public Engine()
 {
     this.restaurantController = new RestaurantController();
 }
Esempio n. 4
0
 public Runner()
 {
     this.restaurantcontroller = new RestaurantController();
 }
Esempio n. 5
0
 public Engine(RestaurantController restaurantController)
 {
     this.restaurantController = restaurantController;
 }
Esempio n. 6
0
 public Engine(RestaurantController restaurantController)
 {
     this.restaurantController = restaurantController;
     this.outputMessages       = new StringBuilder();
 }
Esempio n. 7
0
 public Engine(RestaurantController rc)
 {
     this.rc = rc;
 }
 public CommandInterpreter(RestaurantController restaurantController)
 {
     this.restaurantController = restaurantController;
 }