Domain Modeling, Encapsulation, and Composition
Low-level design defines classes, interfaces, invariants, state transitions, and collaborations inside a component. Start with use cases and domain rules; do not turn every noun into a class automatically. Give each module a cohesive responsibility and let the owner of mutable state enforce its invariants.
Encapsulation prevents callers from creating invalid states. An order should expose meaningful operations such as confirm() or cancel() instead of unrestricted setters that permit impossible combinations. Composition is often preferable to deep inheritance because behavior can vary independently and tests can replace collaborators.
Use class diagrams for static relationships and sequence diagrams for runtime interactions. Show where domain decisions, persistence, network calls, and side effects occur. A strong design makes business rules testable without requiring every test to start a database or call a remote service.