What does a class diagram contain?

The title is a kind of stupid question, as the diagram name already answers. But yesterday this question popped into my head when a professor of analysis and Software projects asked the entire class the class diagram of what would be our project for completion of the period.

Until then all right, it would be just one more in the plethora of diagrams we do in colleges today, and then he made a placement somewhat impossible to be accomplished at least on my part. According to him our class diagram should contain in addition to the basic classes also business rules, interfaces, facades, DAO classes, and the main my 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 that, does it really exist?

Author: bfavaretto, 2016-10-20

2 answers

I actually think it depends. There are several types of class diagram.

Conceptual:

Represents in a slightly more abstract way, not necessarily referencing the final implementation.

Example:

Conceptual Diagram

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

Example:

Specification diagram

Implementation (the most used, and probably what your teacher wants): It has all the classes of the system 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:

Implementation diagram:

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

Refer~encia: http://www.dsc.ufcg.edu.br/~jacques/cursos/map/html/uml/diagramas/classes/classes1.htm

 7
Author: Lucas Queiroz Ribeiro, 2016-12-14 14:17:11

The class diagram lists the concepts that will be implemented in the systems and their relationships. It is a consequence of the survey 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 website, shows the basic steps involved in creating the diagram:

  • survey and analysis of system requirements to be developed. Interview with the dentist (s) and the people who work in the Office
  • definition of system objects: patient, schedule, dentist, service, contract, consultation, payment, etc..
  • definition of system actors: patient , dentist, Secretary
  • definition and detail of use cases: make appointment, confirm appointment, register Patient, Register services, etc.
  • class definition: patient , dentist , exam , schedule, service
  • define class attributes and methods:

After all this analysis you arrive in the system Class Diagram: insert the description of the image here

You can read more about class diagrams:

 4
Author: Taisbevalle, 2016-12-14 14:04:49