Third, class diagram
Class diagrams are graphs that display classes, interfaces, and their static structures and relationships. The basic element of a class diagram is a class or interface.
The box of the class can be divided into several layers
 
 
  
  - Class name
- Property List
- Method checklist
- List of properties
If a class has an internal member class, then its class diagram has 5 layers. In a class diagram, other layers can be omitted in UML except that the class name layer cannot omit the must display.
The first layer is the class name, if the class name is Roman, which indicates that the class is concrete (concrete, which can be instantiated), and if the variable name is italic, the class is abstract.
The second layer is the property layer. If there is a + number on the left, it indicates that it is public; if there is one on the left, it indicates that it is private, and if there is a # number, it indicates that it is protected.
The third layer is the method layer. The meaning of the +-# is consistent with the attribute layer.
Method below if there is an underscore, it indicates that it is a static method.
The fourth layer is the nature layer, which is composed of an attribute, an internal variable, an assignment function and a value function. For example:
Public String class1{
Private String JobTitle;
Public String Getjobtitle () {
return jobtitle;
}
public string Setjobtitle (string jobtitle) {
This.jobtitle=jobtitle;
}
}
In a UML diagram, the upper-left corner of a class typically writes out the parent class of the class and the implemented interface in two lines.
1, describing the interface of the class diagram
The class diagram of the interface is almost the same as the class diagram of the class, and the only difference is that the name of the interface has a "interface" word.
An interface is not of a nature and can have the declaration of methods, public, and final static internal member classes.