Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composite Design Pattern Composite, for Using the Cart Class #53

Open
LeonardoGino31 opened this issue Dec 15, 2024 · 0 comments
Open

Comments

@LeonardoGino31
Copy link

Currently, the system requires additional logic to differentiate between individual products and carts containing collections of products, which complicates its maintenance and scalability. To address this, we propose implementing the Composite design pattern, allowing products and carts to be treated uniformly through a common interface. This will simplify cart manipulation, removing unnecessary conditionals and improving system flexibility.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant