예제 #1
0
파일: BookShop.cs 프로젝트: jechev/OOP
 static void Main(string[] args)
 {
     Book book=new Book("Pod Igoto","Ivan Vazov",19.99m);
     Console.WriteLine(book);
     GoldenEditionBook goldenBook=new GoldenEditionBook("Tutun","Dimitar Dimov",22.90m);
     Console.WriteLine(goldenBook);
 }
 static void Main()
 {
     Book book = new Book("Pod igoto","Ivan Vazov",15.90m);
     Console.WriteLine(book);
     Console.WriteLine();
     GoldenEditionBook goldBook = new GoldenEditionBook("Tutun","Dimitur Dimov",22.90m);
     Console.WriteLine(goldBook);
 }
예제 #3
0
        static void Main()
        {
            var book = new Book("Pod Igoto", "Ivan Vazov", 15.90m);

            var goldenBook = new GoldenEditionBook("Tutun", "Dimitar Dimov", 22.90m);

            Console.WriteLine(book);
            Console.WriteLine(goldenBook);
        }
예제 #4
0
        static void Main(string[] args)
        {
            Book book1 = new Book("Kama sutra", "Ne znam ot koi e", 60.00m);
            GoldenEditionBook goldenEd = new GoldenEditionBook("Qka kniga", "Ot men", 110.00m);

            Console.WriteLine(book1);
            Console.WriteLine();
            Console.WriteLine(goldenEd);
        }
예제 #5
0
파일: BookShop.cs 프로젝트: eleansi/SoftUni
        static void Main(string[] args)
        {
            Book book1 = new Book("Kama sutra", "Ne znam ot koi e", 60.00m);
            GoldenEditionBook goldenEd = new GoldenEditionBook("Qka kniga", "Ot men", 110.00m);

            Console.WriteLine(book1);
            Console.WriteLine();
            Console.WriteLine(goldenEd);
        }
예제 #6
0
파일: Program.cs 프로젝트: Penkov/OOP
        static void Main(string[] args)
        {
            Book podigoto = new Book("Pod Igot", "Ivan Vazav", 35.0m);

            GoldenEditionBook perfe = new GoldenEditionBook("Perfe", "perfection", 5.0m);

            Console.WriteLine(podigoto.ToString());
            Console.WriteLine(perfe.ToString());
        }
예제 #7
0
        static void Main(string[] args)
        {
            Book book = new Book("Pod Igoto", "Ivan Vazov", 15.90);

            Console.WriteLine(book);

            GoldenEditionBook goldbook = new GoldenEditionBook("Tutun", "Dimitar Dimov", 22.90);

            Console.WriteLine(goldbook);
        }
예제 #8
0
        static void Main()
        {
            Book book = new Book("Be phenomenal or be forgotten", "Erick Thomas", 17.0);

            GoldenEditionBook goldenBook = new GoldenEditionBook("Be phenomenal or be forgotten", "Erick Thomas", 17.0);

            Book mixBook = new GoldenEditionBook("Be phenomenal or be forgotten", "Erick Thomas", 17.0);

            Console.WriteLine("{0}\n{1}\n{2}\n{3}",book,goldenBook,mixBook, mixBook as GoldenEditionBook);
        }
        static void Main()
        {
            string  author = Console.ReadLine();
            string  title  = Console.ReadLine();
            decimal price  = decimal.Parse(Console.ReadLine());

            Book book = new Book(author, title, price);
            GoldenEditionBook goldenEditionBook = new GoldenEditionBook(author, title, price);

            Console.WriteLine(book + Environment.NewLine);
            Console.WriteLine(goldenEditionBook);
        }
예제 #10
0
        static void Main(string[] args)
        {
            string  author = Console.ReadLine();
            string  title  = Console.ReadLine();
            decimal price  = decimal.Parse(Console.ReadLine());

            Book book = new Book(author, title, price);
            GoldenEditionBook gBook = new GoldenEditionBook(author, title, price);

            Console.WriteLine(book);
            Console.WriteLine();
            Console.WriteLine(gBook);
        }
예제 #11
0
        static void Main(string[] args)
        {
            string  author = Console.ReadLine();
            string  title  = Console.ReadLine();
            decimal price  = decimal.Parse(Console.ReadLine());

            try
            {
                GoldenEditionBook book = new GoldenEditionBook(title, author, price);
                Console.WriteLine(book.ToString());
            }
            catch (ArgumentException ae)
            {
                Console.WriteLine(ae.Message);
            }
        }
 static void Main(string[] args)
 {
     try
     {
         string            author            = Console.ReadLine();
         string            title             = Console.ReadLine();
         decimal           price             = decimal.Parse(Console.ReadLine());
         Book              book              = new Book(author, title, price);
         GoldenEditionBook goldenEditionBook = new GoldenEditionBook(author, title, price);
         Console.WriteLine(book + Environment.NewLine);
         Console.WriteLine(goldenEditionBook);
     }
     catch (ArgumentException ae)
     {
         Console.WriteLine(ae.Message);
     }
 }
예제 #13
0
        public static void Main()
        {
            try
            {
                string  author = Console.ReadLine();
                string  title  = Console.ReadLine();
                decimal price  = decimal.Parse(Console.ReadLine());

                Book book            = new Book(title, author, price);
                GoldenEditionBook gb = new GoldenEditionBook(title, author, price);
                Console.WriteLine(book + Environment.NewLine);
                Console.WriteLine(gb);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
예제 #14
0
        public static void Main()
        {
            try
            {
                var author = Console.ReadLine();
                var title  = Console.ReadLine();
                var price  = decimal.Parse(Console.ReadLine());

                var book = new Book(author, title, price);
                var goldenEditionBook = new GoldenEditionBook(author, title, price);

                Console.WriteLine(book + Environment.NewLine);
                Console.WriteLine(goldenEditionBook);
            }
            catch (ArgumentException ae)
            {
                Console.WriteLine(ae.Message);
            }
        }
예제 #15
0
        public static void Main(string[] args)
        {
            var author = Console.ReadLine();
            var title  = Console.ReadLine();
            var price  = decimal.Parse(Console.ReadLine());

            try
            {
                Book book = new Book(author, title, price);
                GoldenEditionBook goldenEdition = new GoldenEditionBook(author, title, price);

                Console.WriteLine(book + Environment.NewLine);
                Console.WriteLine(goldenEdition);
            }
            catch (Exception ae)
            {
                Console.WriteLine(ae.Message);
            }
        }
예제 #16
0
        public static void Main()
        {
            try
            {
                string  author = Console.ReadLine();
                string  title  = Console.ReadLine();
                decimal price  = decimal.Parse(Console.ReadLine());

                Book book = new Book(title, author, price);
                GoldenEditionBook goldenEditionBook = new GoldenEditionBook(title, author, price);

                Console.WriteLine(book);
                Console.WriteLine(goldenEditionBook);
            }
            catch (ArgumentException ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
예제 #17
0
파일: Program.cs 프로젝트: AndrewTheM/OOP
        static void Main(string[] args)
        {
            try
            {
                string  author = Console.ReadLine();
                string  title  = Console.ReadLine();
                decimal price  = decimal.Parse(Console.ReadLine().Replace('.', ','));

                Book book = new Book(author, title, price);
                GoldenEditionBook goldenEditionBook = new GoldenEditionBook(author, title, price);
                Console.WriteLine(book + Environment.NewLine);
                Console.WriteLine(goldenEditionBook);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            Console.ReadKey();
        }
예제 #18
0
        private static void Main(string[] args)
        {
            var author = Console.ReadLine();
            var title  = Console.ReadLine();
            var price  = double.Parse(Console.ReadLine());

            try
            {
                var book = new Book(title, author, price);
                var goldenEditionBook = new GoldenEditionBook(title, author, price);

                Console.WriteLine(book);
                Console.WriteLine();
                Console.WriteLine(goldenEditionBook);
            }
            catch (ArgumentException ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
예제 #19
0
        static void Main()
        {
            try
            {
                string author = Console.ReadLine();
                string title  = Console.ReadLine();
                double price  = double.Parse(Console.ReadLine());

                Book book = new Book(author, title, price);
                GoldenEditionBook goldenEditionBook = new GoldenEditionBook(author, title, price);

                Console.WriteLine(book);
                Console.WriteLine(goldenEditionBook);
            }

            catch (ArgumentException ae)
            {
                Console.WriteLine(ae.Message);
            }
        }
예제 #20
0
        public static void Main(string[] args)
        {
            string  author = Console.ReadLine();
            string  title  = Console.ReadLine();
            decimal price  = decimal.Parse(Console.ReadLine());

            try
            {
                Book book = new Book(title, author, price);
                Console.WriteLine(book.ToString() + Environment.NewLine);

                GoldenEditionBook goldenEditionBook = new GoldenEditionBook(title, author, price);
                Console.WriteLine(goldenEditionBook.ToString());
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Environment.Exit(0);
            }
        }
예제 #21
0
        public static void Main()
        {
            try
            {
                string  author = Console.ReadLine();
                string  title  = Console.ReadLine();
                decimal price  = decimal.Parse(Console.ReadLine());

                Book book = new Book(author, title, price);
                GoldenEditionBook goldenEditionBook = new GoldenEditionBook(author, title, price);

                Console.WriteLine(book);
                Console.WriteLine(goldenEditionBook);
            }
            catch (ArgumentException ae)
            {
                Console.WriteLine(ae.Message);
            }
            catch (Exception)
            {
                Console.WriteLine("Title not valid!");
            }
        }