From Code to Model

If you can read code, you already understand UML. Click the tabs to see how programming concepts map to diagram notation — the language you will use throughout this course.

Class definition Class Diagram
class Student:
    def __init__(self,
                 name: str,
                 student_id: int):
        self.__name = name
        self.__student_id = student_id

    def enrol(self,
              course: Course) -> bool:
        ...

    def get_transcript(self) -> list:
        ...
Student
- name : String
- studentId : Integer
+ enrol(c : Course) : Boolean
+ getTranscript() : List

Private attributes (-), public operations (+), types made explicit. Units 4–5.

Method call chain Sequence Diagram
def login(username, password):
    user = db.find_user(username)
    if user is None:
        return False
    ok = user.check_password(
             password)
    if ok:
        session.create(user)
    return ok
User   Controller  Database  Session
  |        |           |        |
  |—login()→|           |        |
  |        |—find_user()→        |
  |        |←——user————|        |
  |        |—check_password()    |
  |        |←——ok——————|        |
  |        |  [ok] —create()—→  |
  |←result—|           |        |

Same logic, different view — shows who calls what. Unit 6.

Process flow Activity Diagram
def confirm_order(order):
    validate_cart(order)
    # run in parallel:
    thread_a = charge_payment(order)
    thread_b = notify_warehouse(order)
    await all(thread_a, thread_b)
    send_confirmation(order)
     ● start
     |
[Validate Cart]
     |
  ══════════ fork
  |              |
[Charge       [Notify
 Payment]     Warehouse]
  |              |
  ══════════ join
     |
[Send Confirmation]
     |
     ⊙ end

Fork + join = parallel threads. Unit 7.

Course Structure

Ten units built on a spiral — each one revisiting and deepening earlier work.

Phase 1 — Foundation
Units 1–2

What is software engineering? How do we capture requirements? Defines the vocabulary and scope used throughout the course.

Phase 2 — Core Diagrams
Units 3–7

Use case, class (×2), sequence, and activity diagrams — each building on the last. From goals to structure to behaviour to process.

Phase 3 — Integration
Units 8–9

Bringing all diagrams together into a consistent model. Traceability, contradiction resolution, and audience-aware documentation.

Phase 4 — Analysis
Unit 10

Critical evaluation using quality criteria. Justified critique, design debate, and reflective practice.

Start Course — Unit 1