UML Diagrams
The blueprints of software.
UML Diagrams
Analogy: concept
UML (Unified Modeling Language) is like Architectural Blueprints:
Before building a skyscraper, you draw plans.
- Class Diagram: The floor plan (Structure).
- Sequence Diagram: The script of a play (Interactions).
- Use Case Diagram: The menu of services (Functionality).
The Blueprint Maker
Explore the three most common types of UML diagrams.
UML Blueprint Maker
Car
- speed: int
- color: String
- color: String
+ drive(): void
+ stop(): void
+ stop(): void
Engine
- horsepower: int
+ start(): void
Shows Structure
Key Concepts
-
Class Diagram: Shows classes, attributes, methods, and relationships.
- Static view of the system.
- Uses boxes and arrows.
-
Sequence Diagram: Shows how objects interact over time.
- Dynamic view.
- Uses lifelines (vertical lines) and messages (horizontal arrows).
-
Use Case Diagram: Shows what the system does for the user (Actors).
- Functional view.
- Uses stick figures and ovals.
Why use UML?
- Communication: A picture is worth 1000 lines of code.
- Planning: Catch design flaws before coding.
- Documentation: Help new developers understand the system.
Up Next
Event-Driven