Interactive Puzzles
Practice Use Case, ER, Class, and Data Flow modeling with instant validation.
First Steps: Smart Coffee Kiosk
A smart coffee shop has a digital self-service kiosk. A Customer interacts with the kiosk to Order Coffee. A Barista in the back interacts with the system to Prepare Drink. Both use cases reside inside the Coffee Kiosk system boundary.
ATM Cash Withdrawal & Mandatory PIN
At an ATM, a Bank Customer wants to "Withdraw Cash". However, the bank security protocol strictly requires that every cash withdrawal MUST verify the userâs PIN ("Verify PIN") as an inseparable, mandatory sub-flow.
Classify: Include vs. Extend Dilemma
In an online store checkout system: 1. Every shopper who performs "Checkout" MUST have their inventory deducted via "Update Inventory" (mandatory). 2. During "Checkout", shoppers CAN OPTIONALLY choose to "Apply Discount Coupon" if they happen to have a coupon code (optional/conditional enhancement).
Fix: The Glitched Online Bookstore
An inexperienced intern drafted this Use Case diagram for a Bookstore system. A Customer searches books and checks out. "Process Payment" is mandatory for Checkout, and "Gift Wrap" is an optional add-on during Checkout. But the intern made 3 glaring UML mistakes! Find and correct them.
Specialization: Hospital Medical Staff
In a hospital system, a generic Doctor can "View Patient Records". A Cardiologist is a specialized type of Doctor who inherits all capabilities of a Doctor, and additionally can "Perform Heart Angioplasty".
Ride-Sharing: The Complete Lifecycle
In a ride-hailing app, a Passenger triggers "Request Ride". As an unavoidable requirement, "Request Ride" MUST «include» "Calculate Fare". After completing the trip, the Passenger can OPTIONALLY "Tip Driver" as an «extend» to the trip completion ("Complete Ride"). The Driver receives and executes "Complete Ride".
Fix: Music Streaming App Chaos
A streaming platform has a Subscriber actor. "Stream Song" requires "Authenticate User" (mandatory). When streaming a song, a subscriber can optionally "Download for Offline Play". However, the edges are totally scrambled! Clean up the incorrect relationship types and directions.
Classify: Use Case Generalization
A Customer can execute "Pay for Order". In modern systems, this can be fulfilled in several specific ways: "Pay via Credit Card" or "Pay via PayPal". Each specific payment type is a specialization of the generic "Pay for Order" use case.
Build: University Library Management
Design a University Library system with two actors: Student (primary) and Librarian (secondary staff). Students "Borrow Book". Borrowing a book unconditionally «includes» "Check Student Fine Balance". If the student returns a book late during "Return Book", they are optionally triggered to "Pay Overdue Fine" via «extend».
Master Challenge: Luxury Hotel & Smart Keys
A Grand Hotel offers digital reservations. A Guest can "Book Room". Booking a room strictly «includes» "Process Deposit". When arriving, the Guest executes "Check In". During Check In, if the room is equipped with IoT locks, the system can optionally "Issue Digital Key" via «extend». The Hotel Receptionist participates as secondary actor in "Check In".
Telehealth & E-Prescribing Architecture
A Telehealth platform serves both Patients and Physicians, who share common capabilities as an Authenticated User (signing in via SSO). Both Video Consultation and Async Chat Consultation are specialized forms of Conduct Consultation. Every consultation mandatorily includes Record Clinical Notes and Verify Insurance, and Verify Insurance itself mandatorily includes Log Audit Trail. Optionally, a consultation may be extended by Issue E-Prescription (which also interacts with the external Pharmacy Network system), and a Video Consultation may be extended by Escalate to Emergency Dispatch if a patient is in distress.
Fix: Air Traffic & Weather Advisory
A junior engineer modeled an Air Traffic Control system with 5 serious UML violations: (1) Tower Supervisor should specialize Air Traffic Controller, not the reverse; (2) Radar Sensor is an Actor and cannot have an «include» relationship with Track Aircraft; (3) Log Flight Telemetry is mandatory for Track Aircraft, not an optional «extend»; (4) Issue Storm Reroute optionally extends Track Aircraft, so its arrow direction is backwards; and (5) Authorize Emergency Landing must «include» Clear Runway, not the other way around.
Enterprise CI/CD & Release Governance
In an Enterprise CI/CD platform, both Developer and Release Manager inherit from Engineering Staff, who can View Build Logs. Developers specifically Trigger Pipeline, while Release Managers specifically Deploy Artifact. Trigger Pipeline mandatorily includes Run Security Scan, which in turn mandatorily includes Sign Artifact (interacting with the Container Registry system). Canary Deploy and Blue-Green Deploy are specialized types of Deploy Artifact. Finally, Deploy Artifact may optionally be extended by Manual Approval Gate (for production) or Rollback Release (triggered when the Monitoring System detects regressions).
E-Commerce Order Relationships
An online store tracks Customers, Orders, and Products. A Customer can place multiple Orders, and each Order contains one or more OrderItems referencing a Product.
University Course & Department Schema
A university schema has a broken link: Department is mistakenly connected directly to Enrollment instead of Course, and Student is missing its link to Enrollment.
Payment Gateway Interface
A checkout service processes payments through a PaymentProcessor interface. StripeGateway and PayPalGateway both implement PaymentProcessor, while CheckoutService depends on PaymentProcessor.
Document Composition & Inheritance
In a rich-text editor, a Document strictly owns its Page objects (pages cannot exist without the document). Meanwhile, TextBlock and ImageBlock are specialized types of Block.
Online Order Data Flow
A Customer submits an Order Request to the "1.0 Process Order" process. The process writes order records to the "D1 Orders" data store and sends a Confirmation back to the Customer.
Fix Illegal Direct Store Flow
In a valid Data Flow Diagram, an External Entity can never read or write directly to a Data Store without passing through a Process. Fix this broken payroll DFD!