Exemplo n.º 1
0
        static void Main(string[] args)
        {
            bool cont = true;

            while (cont)
            {
                Console.WriteLine("Welcome to Blockbuster!");

                Blockbuster blockbuster = new Blockbuster()
                {
                };
                DVD dvd = new DVD()
                {
                };
                VHS vhs = new VHS()
                {
                };
                Movie rentedMovie = blockbuster.CheckOut();
                WatchMovie(rentedMovie);

                Console.WriteLine("Press 1. to rent another movie, Press 2. to exit");
                int moveOn = int.Parse(Console.ReadLine());
                if (moveOn == 1)
                {
                    continue;
                }
                else if (moveOn == 2)
                {
                    Console.WriteLine("Goodbye, have a nice day");
                    break;
                }
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Blockbuster blockbuster = new Blockbuster();

            Console.WriteLine("Welcome to Blockbuster!");
            Console.WriteLine("-----------------------");

            while (true)
            {
                Console.WriteLine("Would you like to check out a movie? y to check out, any other key to exit:");
                string again = Console.ReadLine();


                if (again != "y")
                {
                    Console.WriteLine("Goodbye! Come again!");
                    break;
                }

                Console.WriteLine("Here are our current movie selections:");
                Console.WriteLine("--------------------------------------");
                Console.WriteLine();
                Console.WriteLine();


                blockbuster.CheckOut();
            }
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            bool cont = true;

            while (cont)
            {
                Blockbuster b = new Blockbuster();
                b.CheckOut();
            }
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello, welcome to Blockbuster. I love you.");
            Blockbuster blockbuster = new Blockbuster();

            bool runAgain = true;

            while (runAgain)
            {
                blockbuster.CheckOut();

                runAgain = RunProgramAgain();
            }
        }
Exemplo n.º 5
0
        static void Main(string[] args)
        {
            Blockbuster theStore     = new Blockbuster();
            bool        programStart = true;

            while (programStart)
            {
                Console.WriteLine("Welcome to Blockbuster, home of the Blockbuster, may I take your order?");
                Console.WriteLine("Press 1 for a list of what we have");
                Console.WriteLine("Press 2 to check out");
                Console.WriteLine("Press 3 to leave this weird KeanuLand");
                Console.WriteLine();
                int    numInput;
                string input = Console.ReadLine();
                int.TryParse(input, out numInput);
                if (numInput == 1)
                {
                    theStore.PrintMovies();
                    Console.WriteLine();
                    programStart = true;
                }
                else if (numInput == 2)
                {
                    theStore.CheckOut();
                    Console.WriteLine();
                    programStart = true;
                }
                else if (numInput == 3)
                {
                    Console.WriteLine("Cool, see ya");
                    programStart = false;
                }
                else
                {
                    Console.WriteLine("Nope nope nope, 1-3");
                    programStart = true;
                }
            }
        }
Exemplo n.º 6
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to Grand Circus Blockbuster!");
            Blockbuster b = new Blockbuster();

            while (true)
            {
                Console.WriteLine("Please Select a Movie from the list");


                Movie selectedMovie = b.CheckOut();

                Console.WriteLine($"Do you want to watch {selectedMovie.Title} now (Press 'Y' to play and 'N' tp return to the previous menu)?");
                bool answer = YesNoValidation();

                if (answer == true)
                {
                    selectedMovie.Play();
                }
                else
                {
                    continue;
                }
                Console.WriteLine("Would you like to play the whole movie from the beginning? (Y/N)");
                answer = YesNoValidation();
                if (answer == true)
                {
                    selectedMovie.PlayWholeMovie();
                }

                VHS selectedVHS;
                DVD selectedDVD;
                if (selectedMovie is VHS)
                {
                    selectedVHS = (VHS)selectedMovie;
                    Console.WriteLine("Would you like to rewind the movies for the next user?(Y/N)");
                    answer = YesNoValidation();
                    if (answer == true)
                    {
                        Console.WriteLine("Thank you for rewinding!");
                        selectedVHS.Rewind();
                    }
                    else if (answer == false)
                    {
                        selectedVHS.NotRewind();
                        Console.WriteLine("Boo! Now we'll charge you an extra fee!");
                    }
                }
                if (selectedMovie is DVD)
                {
                    selectedDVD = (DVD)selectedMovie;
                    bool playAnotherScene = true;
                    while (playAnotherScene == true)
                    {
                        Console.WriteLine("Would you like to watch another scene? (Y/N)");

                        playAnotherScene = YesNoValidation();
                        if (playAnotherScene == true)
                        {
                            selectedDVD.Play();
                            continue;
                        }
                    }
                }

                Console.WriteLine("Would you like to watch another movie? Y/N");
                answer = YesNoValidation();

                if (answer == true)
                {
                    continue;
                }
                else
                {
                    Console.WriteLine();
                    Console.WriteLine("Thank you for watching! Goodbye!");
                    break;
                }
            }
        }
Exemplo n.º 7
0
        static void Main(string[] args)
        {
            int choice = Blockbuster.CheckOut();

            PlayMovie(choice);
        }