Пример #1
0
 public WithoutPatternApp()
 {
     this.musicPlayerApp   = new MusicPlayerApp();
     this.googleAccountApp = new GoogleAccountApp();
     this.youTubeApp       = new YouTubeApp();
     this.pizzaOrderApp    = new PizzaOrderApp();
 }
Пример #2
0
        public void menu()
        {
            while (true)
            {
                Console.Clear();
                Console.WriteLine("Choose example to run: ");
                Console.WriteLine("1. Music player");
                Console.WriteLine("2. YouTube");
                Console.WriteLine("3. Google account");
                Console.WriteLine("4. Pizza ordering");
                Console.WriteLine();
                Console.Write("Command: ");

                String option = Console.ReadLine();

                Console.Clear();

                switch (option)
                {
                case "1":
                {
                    MusicPlayerApp.getInstance().startApp();
                    break;
                }

                case "2":
                {
                    YouTubeApp.getInstance().startApp();
                    break;
                }

                case "3":
                {
                    GoogleAccountApp.getInstance().startApp();
                    break;
                }

                case "4":
                {
                    PizzaOrderApp.getInstance().startApp();
                    break;
                }
                }
            }
        }