Class Diagram

From Open Risk Manual
Revision as of 18:18, 16 February 2022 by Wiki admin (talk | contribs) (Created page with "== Definition == A '''Class Diagram''' is a graphical UML diagram is a type of static structure diagram that describes the a system by showing the system's classes, their att...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Definition

A Class Diagram is a graphical UML diagram is a type of static structure diagram that describes the 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.

PlantUML Elements

A PlantUML use case diagram specifies and shows the following:

  • An Actor represents a requirement (stimulus) of the system
  • An Action representing a capability of the system
  • A Subject representing the item acted upon by an Action of the system


The use cases are typically represented by either circles or ellipses. The actors are often shown as stick figures.

Example

@startuml
skinparam actorStyle Hollow
left to right direction

skinparam handwritten true
skinparam packageStyle rectangle

actor Customer

actor Clerk
:Bank Clerk: as Clerk

rectangle Deposit {
Customer -- (Help)
(Help) .> (Identification) : optionally
(Identification) .> (Payment) : leads
(Payment) .> (Receipt) : finally
(Help) -- Clerk
}
@enduml

Use Case Diagram

References