UML (Unified Modeling Language) accounts for nearly 30% of exam marks. Learn the strict distinction between Static and Dynamic modeling and exact arrow notations.
| Category | What it Models | Key UML Diagrams |
|---|---|---|
| Static (Structural) | The permanent structure, components, and relationships of software at rest (no time execution). | Class Diagram, Package Diagram, Component Diagram, Deployment Diagram. |
| Dynamic (Behavioral) | How objects interact over time during program execution and state transitions. | Use Case Diagram, Sequence Diagram, Activity Diagram, State Machine Diagram. |
A Class Diagram box consists of 3 compartments: Class Name, Attributes, and Operations (Methods).
+ Public (accessible anywhere)- Private (accessible only within class)# Protected (accessible within package and subclasses)~ Package / Default (accessible within package)<<include>>: mandatory sub-routine (e.g., Checkout always includes Authenticate User). Arrow points TO included use case.<<extend>>: optional conditional feature (e.g., Checkout extended by Apply Discount Coupon). Arrow points TO base use case.OCL is a formal declarative language used to specify constraints on UML models that cannot be shown visually.
context Account inv: self.balance >= 0).context Account::withdraw(amount: Real) pre: amount > 0).post: self.balance = self.balance@pre - amount).Q: In a Use Case Diagram, if Log Error is triggered only when an exception occurs during Process Transaction, is the relationship <<include>> or <<extend>>?
Process Transaction use case under specific conditions.