UPI Study › Courses › Software Engineering › Free lessons › Lesson 7.4 Free with a free account
Breaking Down Requirements: Classes, Functions, and Behaviors
Software Engineering · Chapter 7: Behavioral Models and Requirements AnalysisSection 7.4 · lesson 50 of 1037 min · free with a free account
Free preview
Create a free account to keep watching
It takes a minute and costs nothing. Your free account unlocks all of Chapter 1 and 3 more lessons of Software Engineering.
Lesson complete
Earn the 3 college credits for Software Engineering
Enrolling adds a quiz after each lesson, the graded work and the official transcript. Recommended for credit by NCCRS.
Next lesson: Handling Requirements for Web-Based Applications →← Modeling How Systems Behave Under Different ConditionsNext lesson: Handling Requirements for Web-Based Applications →
In this lesson
Reading the same requirements as classes, functions, and behaviors.
- Explain why 1 perspective misses details
- Describe the class-based, functional, and behavioral perspectives
- Apply all 3 to a single requirement
- Use the 3 as a check on coverage
Transcript
Everything said in the video, section by section (929 words). Read along, or search it.
Behavioral Models and Requirements Analysis
Breaking Down Requirements
Requirements describe a problem from several angles at once. Reading them only one way leaves gaps. This section covers a technique for closing them. Reading the same requirements through three perspectives, class-based, functional, and behavioral. It brings together the class modeling and the state modeling covered earlier.
3 Readings, 1 Question
The Library Team's Blind Spots
A team analyzing requirements for a library checkout system reads through them once, and starts building. Partway through, they realize something. What happens when a member who already has five books, tries to check out a sixth? They never settled what a book actually consists of as a record, or what steps the checkout operation performs. In effect, they read the same sentences three times over. But they only ever asked one kind of question about them.
Why 1 Perspective Isn't Enough
3 Questions, Same Requirements
Requirements written in prose tangle several angles together. What things exist, what the system does, and how it behaves over time. So the technique asks three different questions of the same requirements. The class-based question asks what kinds of things are involved, and how they relate. The functional question asks what the system must actually do. And the behavioral question asks how behavior changes over time, and in response to what. This is an analysis technique, not a new notation. Its output feeds the class modeling and state modeling covered earlier.
Table 1
The Class-Based Perspective
The class-based perspective asks what distinct kinds of things a requirement describes, what data each holds, and how they relate. In practice, you notice every noun that names a meaningful thing, and ask whether it is a class, an attribute of another class, or irrelevant detail. A member checks out a book, so member and book are candidate classes. Record a new loan with a due date. So loan is a class, and the due date is its attribute. And fewer than five active loans tells you a member relates to zero or more loans.
Table 2
The Functional Perspective
The functional perspective asks what the system must actually do, independent of which objects are involved. In practice, you notice every verb phrase describing an action, and ask what triggers it, what it consumes, and what it produces. Verify the member has fewer than five active loans. That is a check, verify loan limit. Record a new loan with a twenty-one day due date. That is record loan. And mark the book unavailable. That is an update, mark unavailable.
Table 3
The Behavioral Perspective
The behavioral perspective asks how behavior changes over time, and in response to events. In practice, you watch for words of condition, timing, or events. Once, after, until, and as long as are reliable signals. Fewer than five active loans is a limit condition on the member. Unavailable until it is returned describes a change in the book. Available, then unavailable, then available again. And when a member checks out a book names the triggering event, the checkout.
Figure 2
1 Requirement, Extracted 3 Ways
Here is one requirement, extracted three ways. When a member checks out a book, verify they have fewer than five active loans. Then record a loan with a twenty-one day due date, and mark the book unavailable until it is returned. The class-based reading pulls out member, book, and loan, with the due date as an attribute of loan. The functional reading pulls out three operations. Verify the loan limit, record the loan, and mark the book unavailable. And the behavioral reading pulls out the loan limit condition, and the book's change of state at checkout and return.
Putting Them Together
A Check on Coverage
Applying all three perspectives is a way of checking coverage. If all three surface consistent, reinforcing detail, as the library requirement does, that is a sign it has been thoroughly analyzed. If a requirement fits none of the three questions, it deserves a second look. It may not be a genuine requirement, or it may have been misunderstood. And while reading, certain language signals each perspective. Nouns for class-based, verb phrases for functional, and timing and condition words for behavioral.
Apply It
Publishing a Course
Let's apply that. An instructor can publish a course only after at least one module has been added. The class-based perspective extracts instructor, course, and module, and notes that a course needs at least one module. The functional perspective extracts an operation, publish course, with a check that at least one module exists. And the behavioral perspective extracts a state change, from unpublished to published, blocked until the module condition is met.
A Common Mistake
Reading Only for the Next Deliverable
Here is a common mistake. A team applies only the class-based perspective to a whole requirements document, because their next deliverable is a class diagram. Later, major behavioral gaps, like unhandled edge cases and missing state transitions, surface only during testing. The deliverable narrowed the questions they asked. And fixing those gaps in testing costs far more than catching them during analysis.
Key Terms
The Vocabulary of This Section
Let's lock in the key terms. The class-based perspective analyzes requirements for the distinct things involved, their attributes, and their relationships. The functional perspective analyzes requirements for the specific operations the system must perform. The behavioral perspective analyzes how something changes over time, and in response to events. And those perspectives find attributes, which are data belonging to a class, functions, which are operations, and states, which are conditions something can be in.
Key Takeaways
What to Carry Forward
To pull this together. Requirements mix things, actions, and behavior. Reading through only one perspective misses what another would catch. The class-based perspective finds things and relationships. The functional perspective finds operations. The behavioral perspective finds change over time. Consistent findings across all three suggest a well-analyzed requirement, and one that fits none deserves a second look. And it is a way of reading, not a new notation. Its findings feed straight into class and state modeling.
About Software Engineering at UPI Study
Software Engineering (Computer Science 301) is a self-paced online course of 103 video lessons in 15 chapters, from process models and agile to requirements, design, user interfaces, reliability, security and project management. It carries a NCCRS credit recommendation for 3 semester credits.
Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Enroll now → Course details Download the syllabus All Computer Science courses Every course with PRO →
Why take it here
Why students take Software Engineering with UPI Study
Where the credit goes
Universities that work with NCCRS
Software Engineering carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
Thomas Edison State UniversitySigned partner
University of the PeopleSigned partner
Charter Oak State CollegeSigned partner
Strayer UniversitySigned partner
Columbia Southern UniversitySigned partner
Indiana TechSigned partner
Penn StateWorks with NCCRS
Southern New Hampshire UniversityWorks with NCCRS
SUNYWorks with NCCRS
+many more cooperating universitiesFind my college →Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.
FAQ
Questions students ask us
About Breaking Down Requirements: Classes, Functions, and Behaviors
What are the class-based, functional, and behavioral perspectives in requirements analysis?
How do you analyze one requirement from three perspectives?
Why does analyzing requirements from only one perspective miss details?
How can the three requirement perspectives be used as a coverage check?
About the Software Engineering course
How many college credits is Software Engineering?
How much does Software Engineering cost and what is included?
Which universities accept UPI Study credits?
How long does Software Engineering take?
How are the exams done?
How do my credits reach my college?
Ready for the full course? Earn 3 credits in Software Engineering.
103 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.
3 credits · NCCRSEnroll →