// File: lab9main1.cpp // // Test file for the Book class #include #include "Book.h" using namespace std ; int main() { // Three famous wizardly books. // Book b1("The Hobbit", "J.R.R. Tolkien", 1234, 8) ; Book b2("The Once and Future King", "T.H. White", 7239, 9) ; Book b3("Harry Potter and the Sorcerer's Stone", "J.K. Rowling", 9212, 15) ; // Let's rate them b1.SetRating(4) ; b2.SetRating(5) ; b3.SetRating(3) ; // Adjust number we order b1.AddOne() ; b1.AddOne() ; b3.AddOne() ; b3.RemoveOne() ; // Print out the order b1.PrintItem() ; cout << "\n" ; b2.PrintItem() ; cout << "\n" ; b3.PrintItem() ; cout << "\n" ; // Can access base class member using :: cout << "Repeat Book #1 info:\n" ; b1.OrderItem::PrintItem() ; }