Loading learning content...
Every Low-Level Design challenge begins the same way: you're handed a problem statement—a parking lot system, a library management system, an elevator controller—and asked to design the classes. But where do you start? How do you systematically identify what classes your system needs?
The blank canvas paralysis:
Many engineers, when confronted with a design problem, experience a moment of paralysis. The problem description contains dozens of concepts, constraints, and behaviors. Should you start with the most important class? The most complex one? The one mentioned first? Without a systematic approach, design becomes guesswork.
The noun extraction technique solves this problem. It's a structured, repeatable method that transforms ambiguous requirements into a concrete list of candidate entities—the building blocks of your object-oriented design.
By the end of this page, you will master the noun extraction technique—a fundamental skill for identifying candidate entities in any LLD problem. You'll learn how to systematically analyze requirements, extract meaningful nouns, and create an initial entity list that forms the foundation of your class design.
The noun extraction technique is a systematic method for identifying candidate entities (classes) from a problem statement by analyzing the nouns present in the requirements. The fundamental insight is simple but powerful:
Nouns in requirements often represent entities in your design.
This technique originates from the observation that in natural language:
By systematically extracting nouns from requirements, you generate an initial list of candidate entities. This list isn't final—it requires refinement—but it provides a concrete starting point that eliminates the blank canvas problem.
This technique leverages the natural alignment between grammar and object-oriented design. In English (and most languages), nouns name entities in the world; in OOP, classes model entities in the domain. The noun extraction technique exploits this parallel to bridge the gap between human-readable requirements and software design.
The technique in three phases:
| Phase | Activity | Output |
|---|---|---|
| 1. Extract | Identify all nouns and noun phrases | Raw noun list |
| 2. Filter | Remove irrelevant, duplicate, and implementation nouns | Candidate entity list |
| 3. Validate | Verify each candidate represents a meaningful domain concept | Refined entity list |
Let's explore each phase in depth.
The first phase is deliberately mechanical. You read through the requirements—every sentence, every bullet point, every constraint—and extract every noun and noun phrase you encounter. At this stage, don't filter or judge; simply collect.
What to look for:
user, vehicle, book, paymentparking lot, library card, elevator button, booking requestAdmin, VIP Customer (may indicate roles or special entities)fleet, inventory, queue, catalogreservation, subscription, membership, session1234567891011121314151617181920
# Parking Lot System - Requirements ## Core Requirements1. The **parking lot** has multiple **floors**.2. Each **floor** has multiple **parking spots** of different types.3. **Parking spots** can be SMALL, MEDIUM, or LARGE.4. **Vehicles** can be **motorcycles**, **cars**, or **trucks**.5. A **vehicle** can only park in a compatible **spot**.6. When a **vehicle** enters, a **ticket** is generated.7. The **ticket** records the **entry time** and **spot** assignment.8. When a **vehicle** exits, the **fee** is calculated based on duration.9. **Payment** can be made via cash, credit card, or mobile payment.10. The **system** should track **occupancy** per floor.11. **Admins** can add or remove floors and spots.12. **Display boards** show available spots per floor. ## Additional Requirements13. VIP **customers** get reserved **spots** near entrances.14. Electric **vehicles** can use charging **stations**.15. The **rate** varies by vehicle type and duration.Extraction pass for Parking Lot requirements:
Reading through the requirements above and extracting every noun:
| Source | Nouns Extracted |
|---|---|
| Req 1 | parking lot, floors |
| Req 2 | floor, parking spots, types |
| Req 3 | parking spots, SMALL, MEDIUM, LARGE |
| Req 4 | vehicles, motorcycles, cars, trucks |
| Req 5 | vehicle, spot |
| Req 6 | vehicle, ticket |
| Req 7 | ticket, entry time, spot, assignment |
| Req 8 | vehicle, fee, duration |
| Req 9 | payment, cash, credit card, mobile payment |
| Req 10 | system, occupancy, floor |
| Req 11 | admins, floors, spots |
| Req 12 | display boards, spots, floor |
| Req 13 | customers, spots, entrances |
| Req 14 | vehicles, charging stations |
| Req 15 | rate, vehicle type, duration |
In Phase 1, err on the side of over-extraction. It's easier to remove irrelevant nouns later than to discover you missed an important entity. Even nouns that seem like attributes or implementation details should be recorded—you'll filter them in Phase 2.
Raw noun list for Parking Lot:
parking lot, floors, floor, parking spots, types, SMALL, MEDIUM, LARGE,
vehicles, motorcycles, cars, trucks, vehicle, spot, ticket, entry time,
assignment, fee, duration, payment, cash, credit card, mobile payment,
system, occupancy, admins, display boards, entrances, customers,
charging stations, rate, vehicle type
This raw list contains 30+ items. Many will be filtered out; some will merge together. But we now have a concrete inventory to work with.
The raw noun list is a starting point, not a class list. Phase 2 applies systematic filters to remove nouns that shouldn't become entities. This is where design judgment enters the process.
Filter 1: Remove duplicates and synonyms
Consolidate nouns that refer to the same concept:
parking lot = system (in this context)spot = parking spotvehicle = vehiclesfloor = floorsFilter 2: Remove implementation-level nouns
Nouns that describe how the system is built rather than what it models:
system — too generic, describes the software itselftypes — a programming concept, not a domain entityassignment — describes an action result, not an entityFilter 3: Remove attribute-like nouns
Nouns that are properties of other entities rather than entities themselves:
entry time — attribute of Ticketduration — calculated from entry/exit timesfee — attribute or result of Payment calculationrate — configuration attributeoccupancy — derived attribute of Floorvehicle type — attribute of VehicleFilter 4: Remove out-of-scope nouns
Nouns that won't be modeled as first-class entities in this design:
entrances — physical feature, probably not a classSMALL, MEDIUM, LARGE — enum values, not classesFiltered candidate list for Parking Lot:
| Candidate Entity | Reasoning |
|---|---|
ParkingLot | Central aggregate, contains floors |
Floor | Has identity, contains spots, tracks occupancy |
ParkingSpot | Has identity and state (available/occupied), can be assigned |
Vehicle | Has identity, interacts with spots, comes in types |
Motorcycle | Specific vehicle type, may have unique parking rules |
Car | Specific vehicle type |
Truck | Specific vehicle type, needs large spots |
Ticket | Has identity, tracks parking session |
Payment | Records transaction, has strategy (cash/card/mobile) |
Admin | Actor with special permissions |
Customer | Actor, especially VIP customers |
DisplayBoard | Shows real-time information |
ChargingStation | Special spot feature for EVs |
Some nouns become enums rather than classes: SMALL, MEDIUM, LARGE become a SpotSize enum. Similarly, cash, credit card, mobile payment might become a PaymentMethod enum or a Strategy pattern. The extraction identifies them; later design decides their form.
The filtered list is your candidate entity list, but it still needs validation. Phase 3 applies domain knowledge and design principles to confirm each candidate deserves to be a class.
Validation criteria:
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
// Validation example: Applying criteria to ParkingSpot /** * Candidate: ParkingSpot * * ✅ Identity test: Yes - each spot has a unique identifier (e.g., "A-101") * ✅ State test: Yes - available, occupied, reserved, out-of-service * ✅ Behavior test: Yes - canFit(vehicle), assign(ticket), release() * ✅ Relationship test: Yes - belongs to Floor, assigned to Vehicle via Ticket * ✅ Multiplicity test: Yes - parking lot has hundreds of spots * ✅ Persistence test: Yes - spot configuration stored in database * ✅ Domain expert test: Yes - parking attendants understand "spot" * * Result: CONFIRMED as entity */class ParkingSpot { id: string; spotNumber: string; floor: Floor; size: SpotSize; status: SpotStatus; canFit(vehicle: Vehicle): boolean { /* ... */ } assign(ticket: Ticket): void { /* ... */ } release(): void { /* ... */ }} /** * Candidate: ChargingStation * * ✅ Identity test: Yes - each station has a unique ID * ✅ State test: Yes - available, in-use, out-of-order * ✅ Behavior test: Yes - startCharging(), stopCharging() * ⚠️ Relationship test: Related to spot? Is it a spot type or spot feature? * ✅ Multiplicity test: Yes - multiple stations in the lot * ✅ Persistence test: Yes - track station usage * ✅ Domain expert test: Yes - recognized concept * * Design decision needed: Is ChargingStation a type of ParkingSpot, * or a separate entity associated with certain spots? * * Option A: ChargingSpot extends ParkingSpot * Option B: ChargingStation is associated with ParkingSpot */ /** * Candidate: VIPCustomer vs Customer * * Question: Are these separate entities or one entity with a type attribute? * * If VIP has significantly different behavior: * → Separate class or subclass * * If VIP is just a flag affecting discounts: * → Single Customer class with membershipType attribute * * Apply YAGNI: Start simple, refactor if needed */Validation outcomes:
After validation, your candidate list becomes a confirmed entity list with design notes:
| Entity | Validation | Design Notes |
|---|---|---|
ParkingLot | ✅ Confirmed | Aggregate root, Singleton in most designs |
Floor | ✅ Confirmed | Contains spots, tracks per-floor stats |
ParkingSpot | ✅ Confirmed | Core entity, uses SpotSize enum |
Vehicle | ✅ Confirmed | Abstract base class candidate |
Motorcycle, Car, Truck | ⚠️ Merge | Subclasses of Vehicle or types? Design decision pending |
Ticket | ✅ Confirmed | Session tracking, payment trigger |
Payment | ✅ Confirmed | Strategy pattern for payment methods |
Admin | ⚠️ Maybe | Could be User with admin role |
Customer | ⚠️ Maybe | Could be User with VIP flag |
DisplayBoard | ✅ Confirmed | Observer pattern, reads lot state |
ChargingStation | ⚠️ Design decision | Composition or inheritance with Spot |
Let's apply the complete noun extraction technique to a different problem: a Library Management System. This example demonstrates the full process from raw requirements to validated entity list.
123456789101112131415
# Library Management System - Requirements 1. The library contains a large collection of books and media items.2. Members can borrow books for a loan period of up to 14 days.3. Each book has an ISBN, title, author, and publication year.4. The library has multiple copies of popular books.5. Members must have a valid library card to borrow items.6. Librarians can add new books, register members, and manage fines.7. Books can be reserved if all copies are currently on loan.8. Overdue books incur a daily fine.9. The catalog can be searched by title, author, subject, or ISBN.10. Members can renew loans online if no one has reserved the book.11. The library has different membership tiers: Basic, Premium, Research.12. Premium members can borrow more items and have longer loan periods.13. Notifications are sent for due dates and available reservations.Phase 1: Extract all nouns
library, collection, books, media items, members, loan period, days,
book, ISBN, title, author, publication year, copies, library card,
items, librarians, fines, reservation, catalog, subject, loan,
membership tiers, Basic, Premium, Research, notifications, due dates
Phase 2: Filter nouns
| Keep | Filter Out | Reason |
|---|---|---|
| Library | ✓ | |
| Book | ✓ | |
| MediaItem | ✓ | |
| Member | ✓ | |
| Librarian | ✓ | |
| Loan | ✓ | |
| Reservation | ✓ | |
| Fine | ✓ | |
| LibraryCard | ✓ | |
| Catalog | ✓ | |
| Notification | ✓ | |
| BookCopy | ✓ (inferred) | |
| collection | Synonym for catalog/inventory | |
| ISBN, title, author | Attributes of Book | |
| loan period, days | Attributes of Loan | |
| subject | Search parameter | |
| membership tiers | Enum values | |
| due dates | Attribute of Loan |
Phase 3: Validate candidates
Applying validation criteria to each filtered noun:
| Candidate | Identity | State | Behavior | Decision |
|---|---|---|---|---|
| Library | ✓ Single instance | ✓ Hours, status | ✓ Search, statistics | ✅ Confirmed (Singleton) |
| Book | ✓ ISBN-based | ✓ Metadata | ✓ Limited, mostly data | ✅ Confirmed (Entity) |
| BookCopy | ✓ Copy ID | ✓ Available/Borrowed | ✓ Borrow, return | ✅ Confirmed (Entity) |
| Member | ✓ Member ID | ✓ Status, tier | ✓ Borrow, reserve, pay | ✅ Confirmed (Entity) |
| Librarian | ✓ Staff ID | ✓ Active/inactive | ✓ Admin operations | ⚠️ Consider: User with role? |
| Loan | ✓ Loan ID | ✓ Active/returned/overdue | ✓ Renew, return, calculate fine | ✅ Confirmed (Entity) |
| Reservation | ✓ Reservation ID | ✓ Pending/fulfilled/cancelled | ✓ Create, fulfill, cancel | ✅ Confirmed (Entity) |
| Fine | ✓ Fine ID | ✓ Pending/paid | ✓ Calculate, pay | ✅ Confirmed or attribute of Loan? |
| LibraryCard | ✓ Card number | ✓ Active/expired | ✓ Issue, renew, suspend | ✅ Confirmed (Entity) |
| Catalog | ✗ No individual identity | ~ | ✓ Search operations | ⚠️ Service, not entity |
| Notification | ✓ Notification ID | ✓ Sent/read | ✓ Send, mark read | ✅ Confirmed (Entity) |
Notice how validation raises design questions: Should Librarian be a subclass of Member or a separate role? Is Fine its own entity or an attribute of Loan? Is Catalog an entity or a service? These questions are valuable—they force you to think about relationships and responsibilities early.
Requirements often contain noun phrases—multi-word expressions that form a single concept. These require careful analysis because they might represent:
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
// Analyzing noun phrases from requirements /** * "parking spot" → Single entity with compound name * The phrase represents one indivisible concept. * * Design: ParkingSpot class */class ParkingSpot { } /** * "book author" → Relationship between entities * Both "book" and "author" are entities; the phrase describes their relationship. * * Design: Book has Author (composition or reference) */class Book { author: Author; // or authors: Author[]}class Author { } /** * "loan period" → Attribute of entity * "loan" is the entity; "period" qualifies a property of loans. * * Design: Loan has period attribute */class Loan { period: number; // in days startDate: Date; endDate: Date;} /** * "VIP customer" → Qualified subset of entity * "VIP" qualifies "customer" — could be a subclass or a type. * * Design Option 1: Inheritance */class Customer { }class VIPCustomer extends Customer { } /** * Design Option 2: Type attribute (often preferred) */enum MembershipTier { BASIC, PREMIUM, VIP }class Customer { tier: MembershipTier;} /** * "credit card payment" → Strategy or type * Suggests different payment methods with different behavior. * * Design: Strategy pattern */interface PaymentMethod { processPayment(amount: Money): PaymentResult;}class CreditCardPayment implements PaymentMethod { }class CashPayment implements PaymentMethod { }class MobilePayment implements PaymentMethod { }If you're unsure whether a noun phrase represents one entity or two, initially treat each noun as a separate candidate. Validation will reveal whether they should merge. It's easier to combine entities than to split them later.
The noun extraction technique is powerful but has failure modes. Understanding these pitfalls helps you apply the technique more effectively.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
// PITFALL: Over-extraction// ❌ Every noun as a class creates noiseclass Title { value: string; }class Author { value: string; }class PublicationYear { value: number; }class ISBN { value: string; } // ✅ Appropriate: These are attributes of Bookclass Book { title: string; author: string; publicationYear: number; isbn: string;} // PITFALL: Missing implicit entities// Requirement: "The system notifies users when their order ships"// The verb "notifies" implies a Notification entity - don't miss it! // ❌ Missing notification conceptclass Order { ship(): void { // Somehow notifies user... no Notification entity }} // ✅ Recognizing the implicit entityclass Notification { recipient: User; type: NotificationType; sentAt: Date; read: boolean;} class Order { ship(): Notification { // Creates and sends notification return new Notification(this.customer, NotificationType.ORDER_SHIPPED); }} // PITFALL: Implementation bleed// ❌ Technical terms creeping into domain modelclass DatabaseConnection { }class HTTPRequest { }class JSONPayload { }class CacheManager { } // These are infrastructure concerns, not domain entities.// The domain model for an e-commerce system doesn't include "database"// even though the system uses one. // ✅ Domain entities onlyclass Product { }class Order { }class Customer { }class Payment { }The noun extraction technique works across domains, but the filtering and validation phases require domain-specific knowledge. Let's see how the same technique produces different entity lists for different systems.
| Domain | Key Requirement | Extracted Entities | Domain-Specific Insight |
|---|---|---|---|
| Ride-Sharing | Drivers accept ride requests from passengers | Driver, Passenger, Ride, Request, Location | Ride and Request might be separate or merged |
| Hotel Booking | Guests book rooms for specific dates | Guest, Room, Booking, Hotel, RoomType | Booking is the central transaction entity |
| Chess Game | Players move pieces on the board | Player, Piece, Board, Square, Move, Game | Move captures game history; each piece type may subclass Piece |
| Elevator System | Elevators respond to floor requests | Elevator, Floor, Request, Controller, Button | Controller coordinates; State pattern for Elevator |
| Social Network | Users post content and follow friends | User, Post, Comment, Follow, Feed, Notification | Follow is a relationship entity; Feed is computed |
Use the domain's vocabulary in your entity names. In hotel booking, use 'Reservation' not 'Booking' if that's what hotels call it. In ride-sharing, use 'Trip' or 'Ride' based on industry convention. Domain-accurate naming makes your design more intuitive to stakeholders.
The technique adapts to domain complexity:
| Domain Type | Typical Entities | Complexity Source |
|---|---|---|
| Transaction-based (e-commerce, banking) | Account, Transaction, Payment, Order | State machines, financial rules |
| Logistics (delivery, shipping) | Package, Route, Vehicle, Warehouse | Optimization, real-time tracking |
| Social (messaging, networking) | User, Message, Group, Relationship | Graph structures, notification systems |
| Gaming (chess, cards) | Game, Player, Move, Board, Piece | Rules engine, game state |
| Scheduling (calendar, appointments) | Event, Slot, Participant, Recurrence | Time handling, conflict resolution |
You've now learned the noun extraction technique—a systematic method for identifying candidate entities from problem statements. Let's consolidate the key insights:
What's next:
Noun extraction identifies what might be an entity. The next page addresses a critical follow-up question: How do you distinguish an entity from an attribute? Not every noun deserves to be a class—some are better modeled as properties of other classes. We'll develop the criteria for making this distinction.
You now have a systematic technique for identifying candidate entities from problem statements. The noun extraction technique transforms the blank canvas of a new design problem into a concrete list of building blocks. Next, we'll learn to distinguish entities from attributes—a critical skill for avoiding bloated designs with too many classes.