This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Class diagram" – news · newspapers · books · scholar · JSTOR(February 2009) (Learn how and when to remove this message)
UML diagram types
Structural UML diagrams
Class diagram
Component diagram
Composite structure diagram
Deployment diagram
Object diagram
Package diagram
Profile diagram
Behavioral UML diagrams
Activity diagram
Communication diagram
Interaction overview diagram
Sequence diagram
State diagram
Timing diagram
Use case diagram
v
t
e
In software engineering, a class diagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects.
The class diagram is the main building block of object-oriented modeling. It is used for general conceptual modeling of the structure of the application, and for detailed modeling, translating the models into programming code. Class diagrams can also be used for data modeling.[1] The classes in a class diagram represent both the main elements, interactions in the application, and the classes to be programmed.
In the diagram, classes are represented with boxes that contain three compartments:
The top compartment contains the name of the class. It is printed in bold and centered, and the first letter is capitalized.
The middle compartment contains the attributes of the class. They are left-aligned and the first letter is lowercase.
The bottom compartment contains the operations the class can execute. They are also left-aligned and the first letter is lowercase.
In the design of a system, a number of classes are identified and grouped together in a class diagram that helps to determine the static relations between them. In detailed modeling, the classes of the conceptual design are often split into subclasses.[2]
In order to further describe the behavior of systems, these class diagrams can be complemented by a state diagram or UML state machine.[3]
^Sparks, Geoffrey. "Database Modeling in UML". Retrieved 8 September 2011.
^Flatt, Amelie; Langner, Arne; Leps, Olof (2022), "Phase I: Mapping Legal Concepts to Technical Objects", Model-Driven Development of Akoma Ntoso Application Profiles, Cham: Springer International Publishing, pp. 13–17, doi:10.1007/978-3-031-14132-4_3, ISBN 978-3-031-14131-7, retrieved 2023-01-07
^Scott W. Ambler (2009) UML 2 Class Diagrams. Webdoc 2003-2009. Accessed Dec 2, 2009
In software engineering, a classdiagram in the Unified Modeling Language (UML) is a type of static structure diagram that describes the structure of a...
many types of diagrams which can be roughly divided into three main groups: behavior diagrams, interaction diagrams, and structure diagrams. The creation...
information device : Like the term "illustration", "diagram" is used as a collective term standing for the whole class of technical genres, including graphs, technical...
A use case diagram is a graphical depiction of a user's possible interactions with a system. A use case diagram shows various use cases and different types...
described specifically. System Sequence Diagram (SSD): All systems are treated as a black box, where all classes owned by the system are not depicted. Instead...
product. Builder classes must be mutable. May hamper/complicate dependency injection. In the above UML classdiagram, the Director class doesn't create...
In this UML classdiagram, the Client class doesn't access the subsystem classes directly. Instead, the Client works through a Facade class that implements...
underlying operation's progress changes frequently. In this UML classdiagram, the Subject class does not update the state of dependent objects directly. Instead...
internal storage of code via reflection. In the above UML classdiagram, the Context class does not implement an algorithm directly. Instead, Context...
types of interaction diagrams: Sequence diagram Communication diagram Interaction overview diagram Timing diagram A Communication diagram models the interactions...
which class to instantiate). See also the UML classdiagram below. "Define an interface for creating an object, but let subclasses decide which class to...
independently from the classes of an object structure by adding new visitor objects. See also the UML class and sequence diagram below. The Gang of Four...
subject or its proxy. See also the UML class and sequence diagram below. In the above UML classdiagram, the Proxy class implements the Subject interface so...
exposing its underlying representation.". In the above UML classdiagram, the Client class refers (1) to the Aggregate interface for creating an Iterator...
several specialized languages[citation needed]. In the above UML classdiagram, the Client class refers to the common AbstractExpression interface for interpreting...
In order theory, a Hasse diagram (/ˈhæsə/; German: [ˈhasə]) is a type of mathematical diagram used to represent a finite partially ordered set, in the...
carried out. See also the UML class and sequence diagram below. In the above UML classdiagram, the Invoker class doesn't implement a request directly. Instead...
Both diagrams are meant to visualize static structure of a system. While classdiagrams show classes, object diagrams display instances of classes (objects)...
Activity diagrams are graphical representations of workflows of stepwise activities and actions with support for choice, iteration, and concurrency. In...
composites as homogeneous. In the above UML classdiagram, the Client class doesn't refer to the Leaf and Composite classes directly (separately). Instead, the...
diagram is a widely used diagram style that shows the logical relation between sets, popularized by John Venn (1834–1923) in the 1880s. The diagrams are...
an event on the mediator class. In the above UML classdiagram, the Colleague1 and Colleague2 classes do not refer to (and update) each other directly...
most well-known class of spacetime diagrams are known as Minkowski diagrams, developed by Hermann Minkowski in 1908. Minkowski diagrams are two-dimensional...
which to "hang" variant implementations. In the above UML classdiagram, the AbstractClass defines a templateMethod() operation that defines the skeleton...
A deployment diagram in the Unified Modeling Language models the physical deployment of artifacts on nodes. To describe a web site, for example, a deployment...
desired. In the above UML classdiagram, the client class that requires a target interface cannot reuse the adaptee class directly because its interface...
In Unified Modeling Language (UML), a component diagram depicts how components are wired together to form larger components or software systems. They...
the classdiagram should be reworked. Classes have lifecycles which are modeled in Executable UML with a statechart diagram. The statechart diagram defines...