Beispiel #1
0
        static void addSnack()
        {
            Console.Clear();
            Snack snack = new Snack();

            Console.WriteLine("     Agregar Golosina");
            Console.WriteLine("     ----------------------");
            Console.WriteLine("     Nombre:\n");
            Console.WriteLine("     Tipo: \n");
            Console.WriteLine("     Precio: \n");
            snack.Id = cinema.snacks.Count + 1;
            Console.SetCursorPosition(14, 2);
            snack.Name = Console.ReadLine();
            Console.SetCursorPosition(15, 4);
            snack.Type = Console.ReadLine();
            Console.SetCursorPosition(11, 6);
            snack.Price = Convert.ToDouble(Console.ReadLine());
            cinema.AddSnack(snack);
        }
Beispiel #2
0
        public Cinema()
        {
            users  = new List <User>();
            movies = new List <Movie>();
            snacks = new List <Snack>();
            Movie movie = new Movie(01, "Parasites", 130, "Realismo");

            AddMovies(movie);
            movie = new Movie(02, "FlashPoint", 100, "Animada");
            AddMovies(movie);
            movie = new Movie(03, "Harry Potter", 100, "Fantasia");
            AddMovies(movie);
            Snack snack = new Snack(01, "Pop corn", "Comida", 3.55);

            AddSnack(snack);
            snack = new Snack(01, "Gaseosa", "Bebida", 1);
            AddSnack(snack);
            snack = new Snack(01, "Nachos", "Comida", 4.50);
            AddSnack(snack);
            AddUser(user);
            AddUser(user2);
            AddUser(user3);
            AddUser(user4);
        }
Beispiel #3
0
 public void AddSnack(Snack snack)
 {
     snacks.Add(snack);
 }