using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Books { class Book { public string author; public string publisher; public int yearPublished; public int isbn; public void ReturnBookValues() { Console.WriteLine("Book: " + author); Console.WriteLine("Published: " + publisher); Console.WriteLine("Year Of Publication: " + yearOfPublication); Console.WriteLine("ISBN: " + isbn); } } class Library : Book { public string nameOfLibrary; public string locationOfLibrary; public void ReturnLibraryValues() { Console.WriteLine("Name of Library: " + nameOfLibrary); Console.WriteLine("Location Of Library: " + locationOfLibrary); } } class Program { public static void Main(string[] args) { Book myBook = new Book(); Library myLibrary = new Library(); string selectionValue; Console.WriteLine("What is the name of the book you are reading?"); myBook.author = Console.ReadLine(); Console.WriteLine("What is the publisher of the book you are reading?"); myBook.publisher = Console.ReadLine(); Console.WriteLine("What is the year of publication of the book you are reading?"); myBook.yearPublished = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("What is the ISBN number of the book you are reading?"); myBook.isbn = Convert.ToInt32(Console.ReadLine()); Console.WriteLine(); Console.WriteLine("Are you borrowing this book from a library? (Enter YES or No)'; selectionValue = Console.ReadLine(); selectionValue.ToUpper(); if (selectionValue == "YES") { Console.WriteLine("What is the name of the library you are borrowing the book from?"); myLibrary.nameOfLibrary = Console.ReadLine(); Console.WriteLine("What is the town or city where this library is located?"); myLibrary.locationOfLibrary = Console.ReadLine(); } myBook.ReturnBookValues(); if (selectionValue == "YES") { myLibrary.ReturnLibraryValues(); } Console.Write("Press Enter To TerminateÉ"); Console.Read(); } } }