コード例 #1
0
ファイル: Program.cs プロジェクト: Justnuked/SOA3
        static void Main(string[] args)
        {
            Movie movie = new Movie("OwO");

            MovieScreening movieScreening = new MovieScreening(movie, DateTime.Now, 12);

            Order o = new Order(1, true);

            MovieTicket ticket1 = new MovieTicket(movieScreening, true, 1, 1);
            MovieTicket ticket2 = new MovieTicket(movieScreening, false, 2, 1);
            MovieTicket ticket3 = new MovieTicket(movieScreening, false, 3, 1);
            MovieTicket ticket4 = new MovieTicket(movieScreening, false, 4, 1);

            o.AddSeatReservation(ticket1);
            //o.AddSeatReservation(ticket2);
            //o.AddSeatReservation(ticket3);
            //o.AddSeatReservation(ticket4);

            Console.WriteLine(o.CalculatePrice());


            Console.ReadKey();
        }
コード例 #2
0
ファイル: Order.cs プロジェクト: Justnuked/SOA3
 public void AddSeatReservation(MovieTicket ticket)
 {
     tickets.Add(ticket);
 }