Should I declare Get's and Set's in the UML?

6

I have a question, whenever I create a UML class I have to declare get and set to all classes that use them or I can leave without, as if it were standard and everyone knew that should they implement them even though they are not in the UML?

    
asked by anonymous 28.12.2014 / 03:33

2 answers

4

The most important thing is to always be consistent. This includes being consistent with what the team does.

If the team is still going to define what to do, I would just point out that there are generic access methods by simply specifying a line.

Not everyone agrees with this especially if these methods include some relevant logic, which in a way makes it a method like any other.

    
28.12.2014 / 04:43
0

I always keep the SET / GET implicitly in the Class Diagram, for example.

But I think it depends, the way the teacher wants it done, or even the development team. I've always had a row with UML, since several people have different ideas, concepts, and methods for applying attributes in Diagrams.

    
05.09.2015 / 16:45