1
votes

I would like your guidance on how to create classes and their relationships (generalization, association, aggregation and composition) accurately from my use case diagram

enter image description here

I am trying to create this class diagram so I can use it to create a simple online PHP application that allows the user to register an account, login and logout, and store, search and retrieve data from a MySQL database.

Are my classes correct?

enter image description here

1

1 Answers

0
votes

Giving design advise is a bit tricky with so few details. And with all details it would be too broad. However, here are a few observations:

  • Login is not a use case. It is a constraint which can be linked to certain use cases.

  • Instead of a single verb like Register use verb/subject[/object] to form a short sentence describing the added value coming from the use case.

  • You should use camel case in the way that attributes/operations start with lower character, types/classes with upper case (soVerifyLogin should be verifyLogin.

  • You are using a couple of id attributes. I'd recommend to not use them since they already focus on a database use. The id of objects is implicit (usually its address). Adding an id as implicit attribute should be part of a later refinement.

  • Transport and Cargo are orphans. They should at least be connected with a dependency to UserService (dashed arrows from the latter to the orphans).

These are more or less formal observations. Design, as said, will need thorough discussion with domain experts. But basically your class design is on the track.