Ejemplo n.º 1
0
        public int GetTicketsOn3DMovie(MoviesTime time, int quantity, Extra extra, params Foods[] food)
        {
            int tickettsPrice    = _tickets.OrderTickets(time, quantity);
            int foodsPrice       = _food.OrderFood(quantity, food);
            int accessoriesPrice = _accessories.GetAccessories(extra, quantity);

            return(tickettsPrice + foodsPrice + accessoriesPrice);
        }
Ejemplo n.º 2
0
        public int OrderTickets(MoviesTime time, int quantity)
        {
            switch (time)
            {
            case MoviesTime.at12:
            case MoviesTime.at15:
                return((int)TicketPrice.Day * quantity);

            case MoviesTime.at18:
            case MoviesTime.at21:
                return((int)TicketPrice.Evening * quantity);

            default:
                throw new ArgumentOutOfRangeException(nameof(time), time, null);
            }
        }