educative.io

Class Diagram Association

Why there is a simple association between a product and item class, should not be it like item extends product? Like in the case of Library example Book and BookItem

What is a unidirectional relationship in case of actual code? How it is different from aggregation?

what do you mean by product belong to Product Category?
The product can call Product Category? How does Product Category know what kind of product it is?
Should it not be aggregation? like the product has an instance of ProductCategory and they can exist independently.

How Account should be connected to Product?

2 Likes

Hi @Pooja_Sheoran, I also have the same doubt. Did u find any answer to it?