// Oldham, Jeffrey D. // 2000Feb07 // CS1321 // Example Use of the Shopping Cart Class #include #include // has EXIT_SUCCESS #include #include "shoppingCart.h" int main() { // Create the shopping cart. // The store requires you to "sign in" using your name. shoppingCart sc("Jeffrey D. Oldham"); const double budget = 250.00; // how much we can spend // Add items to the shopping cart. sc.insert("Pepsi", 2.99); sc.insert("Pepsi", 2.99); sc.insert("Pepsi", 2.99); sc.insert("tires", 129.99); // Keep shopping if we have not exceeded our budget. if (sc.totalSoFar() < budget) { sc.insert("windshield", 185.00); sc.insert("Age of Empires II", 44.99); } // Buy the items, specifying a credit card number and where to print // the receipt. sc.checkout("1234 5678 8765 4321"); // Shopping cart automatically destroyed. return EXIT_SUCCESS; }