Projects Inventory

Simulation of Supply Chain Management Gaming Project in C++

Explanation

  1. Product Class:
    • Attributes:
      • name: Name of the product.
      • quantity: Quantity of the product.
    • Methods:
      • getInfo(): Prints the product’s name and quantity.
      • Advertisement
      • adjustQuantity(int amount): Adjusts the quantity by the given amount.
      • hasStock(int amount): Checks if there’s enough stock.
  2. Supplier Class:
    • Attributes:
      • name: Name of the supplier.
    • Methods:
      • supply(Product& product, int amount): Supplies products to the warehouse, adjusting the product’s quantity.
      • Advertisement
  3. Warehouse Class:
    • Attributes:
      • name: Name of the warehouse.
    • Methods:
      • store(Product& product, int amount): Stores products, adjusting the quantity.
      • dispatch(Product& product, int amount): Dispatches products to the retailer, if stock is sufficient.
  4. Retailer Class:
    • Attributes:
      • name: Name of the retailer.
    • Methods:
      • receive(Product& product, int amount): Receives products from the warehouse, adjusting the quantity.
  5. Main Function:
    • Creates instances of Product, Supplier, Warehouse, and Retailer.
    • Simulates the supply chain by calling methods to supply, store, dispatch, and receive products.
    • Prints the final stock of the product.

Usage

Exit mobile version