Skip to content

Latest commit

 

History

History
53 lines (45 loc) · 949 Bytes

uml-diagrams.md

File metadata and controls

53 lines (45 loc) · 949 Bytes

UML Sample Diagrams

Class Diagram

classDiagram
    class Car {
        + make: string
        + model: string
        + year: number
        + start(): void
        + stop(): void
    }
    class Person {
        + name: string
        + age: number
        + drive(car: Car): void
    }
    Car -- Person
Loading

Sequence Diagram

sequenceDiagram
    participant Client
    participant Server
    Client ->> Server: Request
    Server ->> Database: Query
    Database -->> Server: Response
    Server -->> Client: Response
Loading

Activity Diagram (Flow Diagram)

flowchart TD
    A[Christmas] -->|Get money| B(Go shopping)
    B --> C{Let me think}
    C -->|One| D[Laptop]
    C -->|Two| E[iPhone]
    C -->|Three| F[fa:fa-car Car]
Loading

State Diagram

stateDiagram
    [*] --> State1
    State1 --> State2 : Transition1
    State2 --> State3 : Transition2
    State3 --> [*] : Transition3
Loading