MVGFC
MANUEL V. GALLEGO FOUNDATION COLLEGES
Module 3: Used Cases
At the end of the lesson the students should be able to:
A. Be familiar with use case concepts
Lesson: Understanding Use Cases in Software Development
Introduction to Use Cases
Use cases are a valuable tool in
software development that help in
defining the interactions between users
and a system. They provide a detailed
description of how users interact with
the system to achieve specific goals or
tasks. In this lesson, we will explore
the elements of use cases, the process
of building use cases, and the
importance of identifying major use
cases in software development.
1. Elements of Use Case
Use cases consist of several key
elements that define the behavior of
the system from a user's perspective.
Let's explore these elements with
examples:
- Actor: An actor can be a user or an
external system that interacts with the
system. For example, in an online shopping system, the "Customer" is an actor.
SYSTEM ANALYSIS AND DESIGN 1
MVGFC
MANUEL V. GALLEGO FOUNDATION COLLEGES
- Use Case Name: The use case name should be descriptive of the functionality it
represents. For instance, "Place Order" could be a use case name in the online
shopping system.
- Description: The description provides a detailed narrative of the use case, including
the main flow of events. In the "Place Order" use case, the description would outline the
steps from selecting items to payment.
- Preconditions: Preconditions are conditions that must be true before the use case
can be executed. In the "Place Order" use case, the customer must be logged in and
have items in the cart.
- Postconditions: Postconditions are conditions that must be true after the use case is
executed. In the "Place Order" use case, the order is confirmed, and the customer
receives an order confirmation.
- Main Flow: The main flow describes the primary sequence of steps in the use case.
For example, in the "Place Order" use case, the main flow includes selecting items,
adding them to the cart, entering shipping details, and making payment.
- Alternative Flows: Alternative flows describe optional paths or exceptions in the use
case. In the "Place Order" use case, an alternative flow could be the customer applying
a discount code during checkout.
2. Building Use Cases
The process of building use cases involves several steps. Let's illustrate these steps
with examples:
- Identifying Actors: In a social media platform, actors could include "User," "Admin,"
and "Guest."
- Defining Use Case Goals: In an e-learning system, a use case goal could be "Take
Quiz" or "View Course Materials."
- Writing Use Case Descriptions: For the use case "Take Quiz," the description would
include steps like selecting a quiz, answering questions, and receiving results.
- Creating Use Case Diagrams: A use case diagram for a banking system would show
actors like "Customer" and use cases like "Withdraw Money" and "Check Balance."
- Review and Validation: Use cases are reviewed with stakeholders to ensure they
accurately represent user interactions and system functionality.
3. Identifying Major Use Cases
Identifying major use cases is essential for prioritizing system functionality. Let's look at
examples of major use cases:
SYSTEM ANALYSIS AND DESIGN 2
MVGFC
MANUEL V. GALLEGO FOUNDATION COLLEGES
- Analyzing User Goals: In a project management tool, major use cases could include
"Create Project," "Assign Tasks," and "Generate Reports."
- Prioritizing Use Cases: The use case "Generate Reports" may be prioritized over
others due to its importance for decision-making.
- Focusing on Core Functionality: In a music streaming app, major use cases like
"Search for Music," "Create Playlist," and "Play Music" are core functionalities.
By understanding the elements of use cases, following the process of building use
cases, and identifying major use cases, software development teams can effectively
capture user requirements and ensure the system meets user needs.
Conclusion
Use cases serve as a bridge between stakeholders and developers, guiding the
development of software systems that align with user expectations. Through clear use
case definitions and identification of major use cases, software development teams can
prioritize functionality and deliver systems that meet user needs effectively.
SYSTEM ANALYSIS AND DESIGN 3
MVGFC
MANUEL V. GALLEGO FOUNDATION COLLEGES
Activity: Create Your Use Case Diagram
Objective: To practice creating a use case diagram based on a given scenario.
Materials Needed:
- Pen and paper or digital drawing tool
- Use case scenario description (provided below)
Instructions:
1. Scenario Description:
You are tasked with designing a new online banking system for a financial institution.
The system will allow customers to perform various banking transactions, such as
checking account balances, transferring funds between accounts, paying bills, and
updating personal information. The system will also have an administrator role to
manage user accounts and system settings.
2. Task:
Your task is to create a use case diagram for the online banking system based on the
provided scenario. Follow these steps to complete the activity:
a. Identify the actors involved in the system (e.g., Customer, Administrator).
b. Define the main goals or tasks that each actor can perform within the system (e.g.,
Check Account Balance, Transfer Funds, Manage User Accounts).
c. Write a brief description for each use case, outlining the main flow of events and any
alternative scenarios.
d. Create a use case diagram that visually represents the relationships between actors
and use cases in the online banking system. Use stick figures to represent actors and
ovals to represent use cases. Connect actors to the use cases they are involved in with
solid lines and arrows.
e. Include relationships such as <>, <>, and generalization if applicable.
f. Review your use case diagram to ensure it accurately reflects the interactions and
functionalities of the online banking system.
3. Submission:
SYSTEM ANALYSIS AND DESIGN 4
MVGFC
MANUEL V. GALLEGO FOUNDATION COLLEGES
Once you have completed your use case diagram, submit it for review and feedback.
You can either share a digital copy or present your diagram during the next class
session.
4. Discussion:
After all students have completed their use case diagrams, discuss the similarities and
differences in their approaches. Highlight the importance of clear use case definitions
and effective communication in software development.
5. Extension:
For an additional challenge, consider adding more complex scenarios or expanding the
system functionality to include advanced features like security measures, transaction
history, or multi-factor authentication.
References:
1. Gottesdiener, Ellen, and Gorman, Mary. "Visual Models for Software Requirements."
Pearson Education, 2012.
2. Cockburn, Alistair. "Writing Effective Use Cases." Addison-Wesley Professional,
2000.
3. Larman, Craig. "Applying UML and Patterns: An Introduction to Object-Oriented
Analysis and Design and Iterative Development." Prentice Hall, 2004.
4. Bittner, Kurt, and Spence, Ian. "Use Case Modeling." Addison-Wesley Professional,
2002.
Additional Sources:
- IBM Developer
- Lucidchart Blog on Use Case Diagrams
- Visual Paradigm - Use Case Diagrams
- TechBeacon - Use Case Modeling
SYSTEM ANALYSIS AND DESIGN 5