Advertisement
Guest User

Untitled

a guest
Jul 13th, 2020
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.37 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include "product.hpp"
  4. #include "store.hpp"
  5.  
  6. using std::cout;
  7. using std::cin;
  8. using std::string;
  9. using std::endl;
  10.  
  11.  
  12.  
  13. int main()
  14. {
  15.  
  16.     //Create a store
  17.     Store zMart;
  18.  
  19.     //CREATION OF PRODUCTS
  20.     Product hammer("ABC123", "BIG HAMMER", "The most BEST", 9.99, 1);
  21.     Product hammer2("ABC124", "No h ammer here", "The hammer money can buy", 89.99, 99);
  22.     Product hammer3("ABC125", "ham bammer", "Great holiday gift", 4000.53, 6);
  23.  
  24.  
  25.     Product screwDriver("SCD123", "Phillips screw driver", "Not a hammer", 13.99, 33);
  26.     Product screwDriver2("SCD124", "Flat head screw driver", "Doesn't work on nails", 10.99, 3);
  27.     Product screwDriver3("SCD125", "Multi-head screw driver", "So many choices", 16.99, 19);
  28.  
  29.  
  30.     //Add products to store inventory
  31.     zMart.addProduct(&hammer);
  32.     zMart.addProduct(&hammer2);
  33.     zMart.addProduct(&hammer3);
  34.  
  35.     zMart.addProduct(&screwDriver);
  36.     zMart.addProduct(&screwDriver2);
  37.     zMart.addProduct(&screwDriver3);
  38.  
  39.     printf("************************\n\n\n\n");
  40.  
  41.  
  42.     //Browse store
  43.     zMart.productSearch("Hammer");
  44.     zMart.productSearch("screwdriver");
  45.  
  46.     //Add products to cart
  47.     zMart.addProductToCart("ABC123");
  48.     zMart.addProductToCart("ABC123");
  49.     zMart.addProductToCart("SCD125");
  50.  
  51.  
  52.     //Check OUT
  53.     zMart.checkOut();
  54.  
  55.     return 0;
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement