CSCI 370 – Lec 17: Functional vs Non-Functional Requirements, Use Case Modeling, and UML Diagrams


🤩 Functional vs Non-Functional Requirements

Functional Requirements

Functional requirements define the specific behavior or functions of a system, essentially detailing what the system should do. These are based directly on user goals and tasks. They are concrete, measurable, and easy to verify during testing.

Key Characteristics:

Examples:

These types of requirements often correspond directly to features in the UI or system API.

Non-Functional Requirements

Non-functional requirements (NFRs) define constraints on how the system operates rather than what it does. These requirements affect the performance, usability, reliability, and maintainability of a system.

Examples:

Quantifying NFRs is essential for testability. Vague goals like “fast” or “user-friendly” must be made concrete.

Sample Table:

Property Metric Example
Speed < 2s response time for 90% of requests
Size Under 50MB installation footprint
Ease of Use Max 15 min training time for basic usage
Reliability Mean time between failures (MTBF) > 1000 hours
Robustness System resumes within 10s of failure
Portability Runs on 3 major OSs with same codebase

🛍️ Ethnography in Software Engineering

Ethnography is a qualitative research method that involves observing real users in their working context to understand needs, habits, limitations, and environmental factors that affect software use.

Key Goals:

Examples:

  1. In an airport traffic control tower, software may be used by multiple people glancing at shared screens. Accessibility, font size, and multitasking are critical.
  2. Children using educational software may be unfamiliar with keyboard shortcuts or abstract icons, affecting UI decisions.
  3. Users might rely on external tools like calculators or phone apps concurrently with your software.

Design Implication:

These observations affect decisions such as:


📋 Use Case Table

Use Case Tables formally describe interactions between actors (users or systems) and the system. They help identify and validate system requirements through structured scenarios.

Use Case Components:

Example: Library Book Loan Use Case

Description: User borrows one or more books

Precondition: User has library card, picked up books, has no penalties, has not exceeded limit

Ordinary Sequence:

Step Action
1 Librarian starts loan registration process
2 System requests user ID
3 Librarian inputs user ID
4 System requests book IDs
5 Librarian inputs book info
6 System calculates return dates and asks for confirmation
7 User confirms selected books and dates
8 Librarian re-confirms selections
9 System registers the loans and confirms

Postcondition: Books are registered as loaned; user can take them

Exception at Step 3: If user has reached loan limit or has penalty, system cancels request and informs librarian

Comment: Loan rules follow library policy (CRQ-0003, CRQ-0014)

library-loan-usecase


🔸 Use Case Diagram

Use case diagrams summarize high-level user-system interactions visually.

Elements:

Example: Online Shopping System use-case-diagram

Use case diagrams are ideal for early-stage communication with stakeholders.


🔎 Context Diagram

Context diagrams offer a top-level view of a system and how it interfaces with external entities. They are often used during requirement analysis to understand data exchanges.

Components:

Example: Online Community System

context-diagram

This provides a single-page summary of all major data relationships.


⚖️ UML Activity Diagrams

Activity diagrams model workflows and decision points within a process. They are useful for understanding parallelism, synchronization, and conditional paths.

activity-symbols-reference

Common Symbols:

activity-example

Example: Document Workflow

Minimum path involves all actors; max paths involve indefinite revision loops.

Example: Detension Admission Process

detention-decision-activity


▶️ Sequence Diagrams

Sequence diagrams show how objects interact over time. They are useful for modeling scenarios such as user actions triggering background operations.

sequence-diagram

Key Elements:

Example:

Another Example:


📊 State Diagrams

State diagrams model the lifecycle of a single object, representing its various states and transitions due to events.

Example: Car Gear System

state-diagram

Useful for modeling UI states, file lifecycle, or connection statuses.


Summary

This session emphasized a foundational understanding of software system modeling using:

These tools offer a rich visual and formal framework to clarify system behavior and structure before implementation.