# Approaching an LLD Problem: Requirements, Entities and UML

> Follow a repeatable method for LLD rounds: clarify requirements, find entities and relationships, draw class and sequence diagrams, then code the core. Free...

Canonical: https://www.internhack.in/roadmaps/tracks/system-design/lld-approach-and-uml
Last updated: 2026-11-28

Follow a repeatable method for LLD rounds: clarify requirements, find entities and relationships, draw class and sequence diagrams, then code the core.

Intermediate · about 3 hours · difficulty 2/5

Learn first: [Design Patterns for LLD](https://www.internhack.in/roadmaps/tracks/system-design/design-patterns)

Most LLD failures come from starting to code too early. A repeatable method keeps you calm and makes your design easy to follow.

### A step-by-step method

1. **Clarify requirements** (5 minutes): which features are in scope? For a parking lot: multiple floors? vehicle types? payments? Write them as a short list.
2. **Identify entities**: nouns in the requirements become candidate classes (ParkingLot, Floor, Spot, Vehicle, Ticket, Payment).
3. **Define relationships**: association, aggregation, composition ("a Floor has Spots"), inheritance only where it is a genuine "is-a".
4. **Define behaviour**: verbs become methods (parkVehicle, unpark, calculateFee). Decide which class owns each method.
5. **Apply patterns** where variation exists (fee rules as Strategy, spot allocation as Strategy, ticket state as State).
6. **Handle concurrency**: two cars grabbing the same spot, two users booking the same seat.
7. **Code the core flow** with clean interfaces and a small driver or tests.

### UML you actually need

- **Class diagrams**: classes, key fields and methods, relationships with multiplicity (1 to many).
- **Sequence diagrams**: the order of calls for the main use case.
- Optionally an **enum list** and a **state diagram** for objects with a lifecycle.

Draw them quickly; tools like Mermaid, PlantUML or Excalidraw are fine for practice.

### What interviewers look for

Clear separation of concerns, extensibility for the obvious next requirement, correct handling of edge cases and concurrency, readable naming, and the ability to explain trade-offs.

### Pitfalls

- God classes (a ParkingLotManager that does everything).
- Modelling every noun as a class, including ones with no behaviour.
- Ignoring concurrency until the interviewer asks.

You are ready to move on when you can take a fresh prompt such as "design a library management system" and produce a requirement list, class diagram and sequence diagram in 20 minutes.

## Key concepts

- **Clarifying LLD requirements**
- **Finding entities and relationships**
- **Class diagrams**
- **Sequence diagrams**
- **State diagrams**
- **Concurrency considerations**
- **Mermaid or PlantUML**

## Mini project

Design a library management system end to end: requirements list, class diagram and checkout sequence diagram in Mermaid, then implement the core classes with an in-memory store and a small test suite.

## Check yourself

What is the difference between aggregation and composition, and which one describes the relationship between a ParkingFloor and its ParkingSpots?

## Free resources

- [UML diagrams reference](https://www.uml-diagrams.org/) (uml-diagrams.org)
- [Mermaid class diagrams and more](https://mermaid.js.org/) (Mermaid)
- [Awesome Low Level Design](https://github.com/ashishps1/awesome-low-level-design) (GitHub)

Previous: [Design Patterns for LLD](https://www.internhack.in/roadmaps/tracks/system-design/design-patterns) · Next: [LLD Case Study: Parking Lot](https://www.internhack.in/roadmaps/tracks/system-design/lld-parking-lot)

## More in Low-Level Design (LLD) and Object-Oriented Design

- [OOP Principles and SOLID](https://www.internhack.in/roadmaps/tracks/system-design/oop-and-solid)
- [Design Patterns for LLD](https://www.internhack.in/roadmaps/tracks/system-design/design-patterns)
- [Approaching an LLD Problem: Requirements, Entities and UML](https://www.internhack.in/roadmaps/tracks/system-design/lld-approach-and-uml)
- [LLD Case Study: Parking Lot](https://www.internhack.in/roadmaps/tracks/system-design/lld-parking-lot)
- [LLD Case Study: Movie Ticket Booking (BookMyShow)](https://www.internhack.in/roadmaps/tracks/system-design/lld-bookmyshow)
- [LLD Case Study: Expense Sharing (Splitwise)](https://www.internhack.in/roadmaps/tracks/system-design/lld-splitwise)
- [The Machine Coding Round](https://www.internhack.in/roadmaps/tracks/system-design/machine-coding-round)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [System Design Roadmap](https://www.internhack.in/roadmaps/tracks/system-design)
