Example #1
0
        public int BuyTickets(MovieShow movieShow, int[] customersAge)
        {
            TicketOrder order = new TicketOrder(movieShow);

            foreach (int age in customersAge)
            {
                ITicket ticket = GetAppropriateTicket(age);
                order.AddTicket(ticket);
            }

            _ticketOrderRepository.AddOrder(order);

            return(order.GetTotal());
        }
Example #2
0
 public TicketOrder(MovieShow movieShow)
 {
     _movieShow = movieShow;
 }