public TicketVendor()
        {
            Theater nS    = new Theater();
            Theater kasi  = new Theater();
            Theater jothi = new Theater();

            nS.SetName("NS");
            nS.SetCapacity(2);
            nS.SetLoaction("Attur");

            kasi.SetName("Kasi");
            kasi.SetCapacity(2);
            kasi.SetLoaction("Attur");

            jothi.SetName("Jothi");
            jothi.SetCapacity(2);
            jothi.SetLoaction("Parangimalai");

            AddToList(nS);
            AddToList(kasi);
            AddToList(jothi);

            Movie coCo    = new Movie();
            Movie billa   = new Movie();
            Movie kaththi = new Movie();

            coCo.SetId(1);
            coCo.SetName("Kolamavu Kokila");
            coCo.SetCasting("Nayanthara");
            coCo.SetDirector("Ezhil");

            billa.SetId(2);
            billa.SetName("Billa");
            billa.SetCasting("Ajith");
            billa.SetDirector("Sid");

            kaththi.SetId(3);
            kaththi.SetCasting("Vijay");
            kaththi.SetName("Kathi");
            kaththi.SetDirector("A.R. Murugadhas");

            AddToList(coCo);
            AddToList(billa);
            AddToList(kaththi);

            Show s1 = new Show();

            s1.SetShowTime("9:30 AM");
            s1.SetMovie(coCo);
            s1.SetTheater(nS);

            Show s2 = new Show();

            s2.SetShowTime("6:30 PM");
            s2.SetMovie(coCo);
            s2.SetTheater(nS);

            Show s3 = new Show();

            s3.SetTheater(kasi);
            s3.SetMovie(billa);
            s3.SetShowTime("1:30 PM");

            Show s4 = new Show();

            s4.SetTheater(kasi);
            s4.SetMovie(kaththi);
            s4.SetShowTime("9:30 PM");

            Show s5 = new Show();

            s5.SetTheater(jothi);
            s5.SetMovie(kaththi);
            s5.SetShowTime("6:30 PM");

            Show s6 = new Show();

            s6.SetTheater(jothi);
            s6.SetMovie(billa);
            s6.SetShowTime("9:30 AM");

            AddToList(s1);
            AddToList(s2);
            AddToList(s3);
            AddToList(s4);
            AddToList(s5);
            AddToList(s6);
        }
Beispiel #2
0
 public void SetTheater(Theater theater)
 {
     _theater = theater;
 }
 public bool AddToList(Theater theater)
 {
     theaterList.Add(theater);
     return(true);
 }