Skip to content

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

@LeonardoGino31

Description

@LeonardoGino31

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions