How to Discover Classes and Attributes from Business Requirements

Estimated reading: 9 minutes 11 views

To identify classes from requirements, systematically extract potential nouns and verbs from business rules and user stories, then filter them into persistent entities and actions. Validate these candidates against domain expertise to eliminate transient objects, ensuring the resulting class diagram accurately reflects real-world business structure without technical over-specification.

Foundations of Identifying Classes from Requirements

Business Analysts often face the challenge of translating vague business needs into structured technical models. The bridge between business language and system design is the class diagram. The core skill required here is the ability to identify classes from requirements effectively.

This process requires more than simple word selection. It involves understanding domain context, distinguishing between data and behavior, and recognizing the specific vocabulary used by subject matter experts. When a BA successfully identifies classes, they create a blueprint that developers can translate directly into database schemas or object-oriented code.

Failure in this stage often leads to bloated systems with unnecessary complexity. Conversely, a precise identification process ensures that the final software model aligns perfectly with business goals. The following sections detail the exact methodology for achieving this clarity.

Step 1: Extract Potential Entities and Concepts

The first phase involves a thorough scan of all available requirement artifacts. This includes user stories, functional specifications, and recorded stakeholder interview notes. You are looking for potential nouns that represent things the business cares about.

Start by highlighting every noun in the requirement text. Do not filter or judge yet. If a stakeholder says, “The system must calculate the interest on a customer’s loan,” the potential candidates are “system,” “interest,” “customer,” and “loan.” This raw list forms the initial pool of class candidates.

Ensure you capture specific terms rather than generalizations. For instance, instead of just “order,” look for “premium order” or “international order” if the requirements treat them differently. This granularity helps in identifying subclasses later. The goal here is volume and coverage, not precision.

Step 2: Distinguish Between Entities and Actions

Once you have a list of nouns, you must categorize them. Some nouns represent static data (classes), while others represent processes (methods or use cases). This distinction is critical for the next step of identifying classes from requirements.

Apply the “Noun-Verb Test.” If the noun can perform a verb or be acted upon by a verb, it is likely a class. If the word describes an action itself (e.g., “processing,” “calculating,” “authenticating”), it is likely a method or a use case, not a class.

  • Customer: A noun that has properties (Name, Address) and can be acted upon. Keep as a class.
  • Order: A noun that has properties (Order ID, Date) and relationships. Keep as a class.
  • Process Order: A verb phrase. Convert to a method within the Order class or a use case.
  • Report: Ambiguous. If it is a document stored in the system, it is a class. If it is the act of generating a report, it is an action.

Remove transient concepts that exist only during processing. For example, if a user selects an item, “SelectedItem” might be a temporary object in the code, but it should not appear in the permanent class diagram unless it needs to be stored in the database.

Step 3: Analyze Relationships and Associations

After filtering your list, you must determine how the remaining classes interact. Requirements often imply relationships through phrasing like “belongs to,” “includes,” or “responsible for.” Identifying these links is a crucial part of modeling from requirements.

Review the requirement text for prepositions. Words like “of,” “to,” “with,” and “for” often signal associations. For example, “An Employee manages a Project” implies a relationship between the Employee class and the Project class.

Determine the cardinality and multiplicity of these relationships based on the text. Does one Customer have exactly one Credit Card, or can they have many? Does a Project have one or many Employees? The requirement description should dictate these numbers.

If the text is vague, such as “The system tracks employees,” do not assume the relationship. Instead, ask the stakeholder for clarification. Vague relationship definitions lead to ambiguity in the final model and can cause integration errors.

Step 4: Normalize Entities and Remove Redundancy

The next step is to refine the list of classes to avoid redundancy. This involves normalizing the entities. In many requirement texts, the same concept appears under different names or is fragmented across multiple descriptions.

Consolidate duplicate concepts. If “Customer” and “Client” appear in the text interchangeably without distinct functional differences, choose one term and standardize it. Consistency in naming convention is vital for clear communication between the BA and the development team.

Check for generalizations and specializations. Is there a need to separate a generic “Payment” into specific types like “Credit Card Payment” and “Bank Transfer”? Only create subclasses if the requirements explicitly differentiate behavior or attributes for these specific types.

Ensure that every class serves a distinct business purpose. If a class exists solely to store a value that already belongs to another class (e.g., a “Customer Name” class that only holds a string for the Customer class), remove it. This reduces the complexity of the diagram.

Defining Attributes with Precision

Once the classes are identified, the focus shifts to defining their internal state. Attributes are the data points that describe the class. This step is often where the “identify classes from requirements” process stalls due to over-specification.

Extract attributes by looking for nouns associated with a specific class in the requirement text. These are often found in phrases like “The [Class] has a [Attribute] that [Description].” For example, “The Loan has an interest rate of 5%.” Here, “interest rate” is the attribute.

Do not confuse data types with attributes. The requirement “The ID must be 12 digits” defines the data type and validation rules, not the attribute name itself. The attribute is simply “ID.”

  • Extract the Name: Focus on the business meaning of the data point.
  • Verify the Need: Ask, “Is this data needed for business decisions or system logic?” If not, exclude it.
  • Check for Mergers: Ensure you haven’t split one logical property into two (e.g., “First Name” and “Last Name” might be better as “FullName” if used only together).

When defining attributes, consider the source of the data. Is it user input, or is it calculated? If it is calculated (e.g., “Total Balance”), it should be marked as derived or transient in your model to distinguish it from stored data.

Avoid technical attributes like “Timestamp” or “Primary Key” unless they are explicitly required by the specific business context. These are implementation details that often clutter the initial requirement analysis phase.

Avoiding Technical Over-Specification

A common pitfall in identifying classes from requirements is importing technical design decisions prematurely. This includes database field names, UI layout constraints, or specific technology choices. The class diagram should remain technology-agnostic at this stage.

Focus on business rules. If a requirement states “The system must use a SQL database,” do not add a class called “Database Connection.” The implementation mechanism is the developer’s responsibility, not the business analyst’s.

Resist the urge to model “screen” objects. Unless the screen layout defines a distinct business object, it should not be a class. A “Login Screen” is a use case, not a class containing data.

If a stakeholder says, “We need a field for the phone number,” translate this to the attribute “PhoneNumber.” Do not add attributes for phone number formatting or country codes unless those specifics are part of the business rules. Keep the model high-level and flexible.

Validating Your Class Model

The final step in the identification process is validation. Before presenting the model, review it against the original requirement set. Does every class appear in at least one requirement? Are all attributes necessary?

Present the model to domain experts. Ask them to review the class names and attribute definitions. If they use different terminology than your model, do not change the model immediately. Instead, understand why they use different terms. Sometimes a mismatch reveals a gap in your understanding.

Check for circular dependencies or impossible relationships. If Class A depends on Class B, but Class B depends on Class A in a way that creates a logic loop, revisit the requirements. This often indicates a misunderstanding of the business process flow.

Ensure the model is complete enough to support the intended use cases. If a use case cannot be executed on the class diagram (e.g., a user cannot “pay” because there is no “Payment” class), the model is incomplete.

Best Practices for Requirement Analysis

Consistency is key when identifying classes from requirements. Use a standard naming convention, such as CamelCase or TitleCase, for all class names. This makes the diagram easier to read and reduces cognitive load for stakeholders.

Document the rationale behind class creation. If a class seems odd, note why it exists in the requirements. This serves as a reference if the design needs to change later. Documentation acts as an audit trail for the modeling decisions.

Iterate on the model. Requirement analysis is rarely a linear process. You may identify a new class after refining an existing one. Be prepared to update the diagram as your understanding deepens.

Collaborate with developers early. While you should not let them dictate the model, understanding their constraints can help you refine the attributes. For example, they might point out that an attribute would be computationally expensive to store, suggesting a better alternative.

Key Takeaways

  • Systematically extract nouns from requirement text to generate a raw list of potential classes.
  • Distinguish between entities (classes) and actions (methods) using the Noun-Verb test.
  • Analyze prepositions and verbs to define relationships and cardinality between classes.
  • Normalize entities to remove redundancy and ensure consistent naming conventions.
  • Define attributes based on business data needs, avoiding premature technical specifications.
  • Validate the model with stakeholders to ensure alignment with business reality.
Share this Doc

How to Discover Classes and Attributes from Business Requirements

Or copy link

CONTENTS
Scroll to Top