예제 #1
0
 static void Main(string[] args)
 {
     BookDB bookDB = new BookDB();
     AddBooks(bookDB);
     Console.WriteLine("Paperback Book Tites:");
     bookDB.ProcessPaperbackBooks(new ProcessBookDelegate(PrintTitle));
     PriceTotaler totaller = new PriceTotaler();
     bookDB.ProcessPaperbackBooks(new ProcessBookDelegate(totaller.AddBookToTotal));
     Console.WriteLine("Average Paperback Book Price: ${0:#.##}", totaller.AveragePrice());
     Console.ReadKey();
 }
예제 #2
0
        static void Main(string[] args)
        {
            BookDB bookDB = new BookDB();

            AddBooks(bookDB);
            Console.WriteLine("Paperback Book Tites:");
            bookDB.ProcessPaperbackBooks(new ProcessBookDelegate(PrintTitle));
            PriceTotaler totaller = new PriceTotaler();

            bookDB.ProcessPaperbackBooks(new ProcessBookDelegate(totaller.AddBookToTotal));
            Console.WriteLine("Average Paperback Book Price: ${0:#.##}", totaller.AveragePrice());
            Console.ReadKey();
        }