Class ProductShelfController

java.lang.Object
com.jahnreil_stratpoint.controller.ProductShelfController

public class ProductShelfController extends Object
The type Product shelf controller. This class is responsible for managing the product shelf and handling user interactions related to viewing and adding products to the cart.
  • Field Details

  • Constructor Details

    • ProductShelfController

      public ProductShelfController(ArrayList<Product> products, CartController cartController)
      Instantiates a new Product shelf controller with the given list of products and cart controller.
      Parameters:
      products - the list of products to be displayed on the shelf
      cartController - the cart controller to manage cart operations
  • Method Details

    • showProducts

      public void showProducts(ArrayList<Product> products)
      Displays the list of products in a paginated format and handles user interactions for adding products to the cart and navigating between pages.
      Parameters:
      products - the list of products to be displayed