What does a class diagram contain?

Asked

Viewed 658 times

7

The title is a kind of stupid question, because the name of the diagram already answers. But yesterday this question came to mind when a professor of Analysis and Software Projects asked the whole class diagram of what would be our project for the conclusion of the period.

So far so good, it would be just one more in the plethora of diagrams that we do in colleges today, and then it made a placement somewhat impossible to be performed at least on my part. According to him our class diagram should contain beyond the basic classes also the rules of business, interfaces, facades, DAO classes, and the main mine controllers (system is web and developed with JSF, would be the Bean).

Is that right? I mean, it’s not common to see a diagram like this, it actually exists?

2 answers

7


Actually, I think it does. There are several types of class diagram.

Conceptual :

It represents in a somewhat more abstract way, not necessarily making reference to the final implementation.

Example:

Diagrama Conceitual

Specification: Perspective aimed at those who need to know the rules of the system but not its implementation (as project manager for example) That’s why it focuses on the main methods of the system.

Example:

Diagrama de especificação

Implementation (The most used, and probably what your teacher wants): It has all the system classes and their methods, attributes, interfaces and everything related to implementation. Aimed at the development team, with all the necessary details for the implementation of the system.

Example:

Diagrama de implementação:

This does not mean that if necessary, these diagrams cannot be changed to accommodate a new method or class that was initially not specified.

Reference: http://www.dsc.ufcg.edu.br/~Jacques/cursos/map/html/uml/diagrams/classes/classes1.htm

  • Thanks Lucas, I thought my teacher was a little crazy, but I’m going to have to study this a lot because what’s past is very different from what he asked. Thank you so much for your help!

  • Usually the class diagram is one of the last steps of the process, after having made the other diagrams as use case, relationships, etc...

  • However, I think it is important to point out that with the popularization of Agile development, it is very rare to find a project with the complete UML, class diagram so I particularly participated in very few projects with a.

4

The class diagram lists the concepts that will be implemented in the systems and their relations. It is a consequence of the lifting of requirements, definition of use cases and classes. The great importance of the diagram is that it defines the structure of the system.

This example, taken from the Macoratti, show the basic steps involved in creating the diagram:

  • Survey and analysis of requirements of the system to be developed. Interview with the dentist(s) and with the people working on office
  • Definition of system objects : Patient, schedule, dentist, service, contract, consultation, payment, etc..
  • Definition of the actors of the system : patient, dentist , secretary
  • Definition and detailing of use cases: make an appointment , confirm appointment , register patient , register services , etc.
  • Definition of classes : patient , dentist , exam , schedule , service
  • Define class attributes and methods :

After all this analysis you arrive at the system class diagram: inserir a descrição da imagem aqui

You can read more about class diagrams:

  • Such, the one that you gave me as an example to min is the common one, but never knew that business rules, DAO classes and even site controllers will be included in a diagram.

  • And so my amazement, until then this to me would be something impossible, because I’ve never seen something like this anywhere.

  • @user58589, the diagrams are used to represent the systems, this facilitates the understanding of them, ie you can represent "all" your system for them. In these links I left to complement explains the theoretical part, how you are studying is worth reading.

  • All right, I’ll look yes, thanks for the help!

Browser other questions tagged

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