Class ProductShelfController
java.lang.Object
com.jahnreil_stratpoint.controller.ProductShelfController
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 Summary
-
Constructor Summary
ConstructorDescriptionProductShelfController
(ArrayList<Product> products, CartController cartController) Instantiates a new Product shelf controller with the given list of products and cart controller. -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.
-
Field Details
-
products
-
-
Constructor Details
-
ProductShelfController
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 shelfcartController
- the cart controller to manage cart operations
-
-
Method Details
-
showProducts
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
-