Esempio n. 1
0
        public void inputItems()
        {
            Console.WriteLine("1. 와인 2. 소주 3. 맥주");
            string Input = Console.ReadLine();

            if (Input == "1")
            {
                Console.WriteLine("술이름과 특징 입력");
                string Name     = Console.ReadLine();
                string Property = Console.ReadLine();
                Drink  Wine     = new Wine(Name, Property);
            }
            else if (Input == "2")
            {
                Console.WriteLine("술이름과 특징 입력");
                string Name     = Console.ReadLine();
                string Property = Console.ReadLine();
                Drink  Soju     = new Soju(Name, Property);
                list.Add(Soju);
            }
            else if (Input == "3")
            {
                Console.WriteLine("술이름과 특징 입력");
                string Name     = Console.ReadLine();
                string Property = Console.ReadLine();
                Drink  Beer     = new Beer(Name, Property);
                list.Add(Beer);
            }
        }
Esempio n. 2
0
        public void inputItems()
        {
            Console.WriteLine("1. 와인 2. 소주 3. 맥주");
            string Input = Console.ReadLine();
            if (Input == "1")
            {

                Console.WriteLine("술이름과 특징 입력");
                string Name = Console.ReadLine();
                string Property = Console.ReadLine();
                Drink Wine = new Wine(Name, Property);

            }
            else if (Input == "2")
            {
                Console.WriteLine("술이름과 특징 입력");
                string Name = Console.ReadLine();
                string Property = Console.ReadLine();
                Drink Soju = new Soju(Name, Property);
                list.Add(Soju);
            }
            else if (Input == "3")
            {
                Console.WriteLine("술이름과 특징 입력");
                string Name = Console.ReadLine();
                string Property = Console.ReadLine();
                Drink Beer = new Beer(Name, Property);
                list.Add(Beer);
            }
        }