Skip to content

Shopping Cart Junit

2 classes with association

classDiagram
    class Cart {
        +add(product)
        +getTotalPrice(float)
        +remove(product)
        +count()
        +emptyCart()
    }
    class Product {
        -String name
        -float price
        +Product(name, price)
    }
    Cart "0..*" --> "0..*" Product