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); }
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); }
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); }
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()); }
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); }
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); }
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); }
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); } }
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); } }
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); } }
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); } }
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); } }
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(); }
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); } }
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); } }
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); } }
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!"); } }