Doubt in class diagram

Asked

Viewed 1,370 times

4

I am developing my class diagram of a project and got the following question: Diagrama de Classe

How do I indicate that only ADM can register a contributor? Do I have to put that in the Class Diagram right now? Thank you

Do you have any method to visualize the classes I might have? Because at this stage I feel kind of lost because you don’t know if what I think is a class or not! Thank you!

  • 1

    Unless mistaken ADM pode cadastrar um contribuinte would be function of the use case diagram. With the use case diagram it becomes easier to define the classes, thus you do not get meio perdido por não sabe se o que eu penso é uma classe ou não.

  • 1

    I understand you man... It’s just that my Use Case is not the best either.. I’ll have to redo or implement them! Vlw by tip @rubStackOverflow

1 answer

3


In this case, this representation in the diagrama de classes, because this same representation can be made in the diagram of Máquina de Estados. Because I’m not going to tell you with 100% certainty, but I think the class diagram doesn’t have the resources for this procedure, so I made some small modifications to the class and possible representation of state machines.

1. Class diagram

This one has added a new atributo concerning the tipo de usuário if it will be comum ou administrador, as well as the methods for CRUD and only an annotation referring to the restriction of only the administrator can register the contributor.


inserir a descrição da imagem aqui
2. State Machine Diagram

In the representation of the state machines diagram the register of the taxpayer is represented, where the tipo user, if it is administrador the registration of the taxpayer will be carried out and soon after the end of the process, if the user is of the type comum the process will then be finalized since he cannot perform this procedure.


inserir a descrição da imagem aqui

  • I must make a small note regarding the relationship of Contributor with User, where the Contributor is actually a heritage of User.

  • Killed the stick Joaquim... clarified a lot to me, I have to be more specific in the classes! I don’t know if the teacher will require the State Machine... but it still helps to understand the process! Thanks for the help! Hugging!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.