Search code examples
javaoopinheritanceumlclass-diagram

How to draw a correct class diagram?


I'm working on a project called: Inventory Management System

I just draw a simple class diagram about my project.

My question: is this class diagram correct?

Is (Inventory) class in this position correct?

enter image description here


Solution

  • It does not make sense to me why you would say that an inventory is a specialication of a person.

    Is the aggregation deliberate (did you intend to use composition)?

    Having login,register,delete,change in inventory is a smell, these methods have nothing to do with the other three. You even group them together. I would split that class up into three classes to seperate the responsability.