Design class Diagram
In the developed society of Cash information, the circulation of books is increasing day by day. The management of books by hand is a very heavy task. To improve work efficiency, we can introduce information technology, so as to reduce the manpower burden, reduce costs and bring convenience to users.
The class diagram shows the static structure of the model, especially the classes that exist in the model, the internal structure of the classes, and their relationships to other classes.
Class diagrams (classes diagram) consist of many (statically) descriptive model elements, such as classes, packages, and their relationships, which are interconnected with their contents. Class diagrams can be organized in (and belong to) packages, showing only relevant content in a specific package.
Class diagram is the most commonly used UML diagram, showing classes, interfaces, and their static structures and relationships, which are used to describe the structural design of a system.
The most basic element of a class diagram is a class or interface (diagram).
Typically consists of 3 components. The first is the class name, the second is the attribute (attributes), and the third is the method provided by the class (The nature of the class can be placed in the fourth part; If the class contains an inner class, the fifth component appears). The class name part cannot be omitted, and the other components can be omitted.
Class name writing specification: Traditional word Description class is can be instantiated, italic word description class is abstract class.
Property and Method Writing specification: modifier [Description Information] property, method name [parameter] [: return type | type]
Properties and methods can be attached before the visibility modifier:
- If the property or method has an underscore, it is static.
- The nature of a class consists of a property, an assignment method, and a method of taking a value.
- No classes exist alone, and they often collaborate with other classes to create more semantics than work alone. So, in addition to capturing the vocabulary of the system, focus on how these classes work together. Use class diagrams to express this collaboration.
The class diagram is represented as follows:
1. Use case diagram
Use case diagrams for ① borrowers requesting services
The use case diagram of ② Library Administrator to handle borrowing and returning books
③ system Administrator's use case diagram for system maintenance
2. Static modeling
1. Class Diagram
Design class Diagram