Long journey of Ruby standard library at RubyConf AU 2024
UML Object-Oriented Analysis and Design
1. Object-Oriented Analysis and Design Using UML
Objectives
In this session, you will learn to:
Set system boundaries and project scope
Refine the system definition
Ver. 1.0 Slide 1 of 27
2. Object-Oriented Analysis and Design Using UML
Setting Boundaries and Project Scope
System boundaries are set for each iteration of the system
to depict the functionality in terms of the use cases and
actors.
When designing a complex system, system boundary
enables you to clearly demarcate which sub-system is being
modeled.
After setting the system boundary, scope for the software
system is established.
Ver. 1.0 Slide 2 of 27
3. Object-Oriented Analysis and Design Using UML
Identifying System Boundary
To identify system boundary:
Prioritize use cases of the system.
Identify iterations for developing the system.
Identify the interaction between use cases and actors of each
iteration.
You represent the system boundary using a rectangular box
around the use cases in the use case diagram.
Ver. 1.0 Slide 3 of 27
4. Object-Oriented Analysis and Design Using UML
Establishing Project Scope
Establishing project scope before implementing the project
ensures that all the requirements of the project are fulfilled
in time and with the available resources.
Project scope is a function of:
Project functionality
Project resources
Available time
To establish the project scope:
Identify the requirements of the system.
Set priorities for the requirements to identify successive
iterations.
Assess the efforts required to implement the requirements.
Analyze the impact of implementing each requirement of the
system.
Ver. 1.0 Slide 4 of 27
5. Object-Oriented Analysis and Design Using UML
Just a minute
Which of the following refers to the objectives that the
deliverable product should fulfill?
1. Project Functions
2. Project Reports
3. System Boundary
4. Available Time
Answer:
Project Functions
Ver. 1.0 Slide 5 of 27
6. Object-Oriented Analysis and Design Using UML
Refining the System Definition
Use cases defined in the initial iterations of the development
process may not be elaborate and specific due to
inadequate information about the software system.
You need to refine software system definition to obtain
detailed and specific information that enables you to design,
code, and test the software system.
To refine the software system definition, you refine use
cases and establish relationships among use cases.
Ver. 1.0 Slide 6 of 27
7. Object-Oriented Analysis and Design Using UML
Refining Use Cases
The steps to refine use cases are:
Review the actors of the use cases.
Review the names of the use cases.
Refine the description of the use cases.
Define and refine the flow of events.
Identify alternate paths.
Identify preconditions and post conditions.
Identify the non-functional requirements.
Ver. 1.0 Slide 7 of 27
8. Object-Oriented Analysis and Design Using UML
Establishing Relationship among Use Cases
Relationships that can be established among use cases
are:
– Extend: Indicates that an existing use case is extended by
additional behavior to obtain another use case. The direction of
the arrow in the extend relationship points to the use case that
is extended to obtain another use case.
Ver. 1.0 Slide 8 of 27
9. Object-Oriented Analysis and Design Using UML
Establishing Relationship among Use Cases (Contd.)
Include: Indicates that the functionality of a use case is
included in the functionality of another use case. The direction
of the arrow in the include relationship points to the use case
that is included in another use case.
Ver. 1.0 Slide 9 of 27
10. Object-Oriented Analysis and Design Using UML
Realizing Use Cases in the Design Phase
Design phase requires understanding of how the
functionality of a use case can be implemented using
classes, interfaces, and sub-systems.
UML provides specific modeling constructs, known as
collaboration, to model use case realizations in the design
phase.
Collaboration is a collection of classes, interfaces, and
sub-systems that interact with each other to accomplish the
functionality of a use case.
Ver. 1.0 Slide 10 of 27
11. Object-Oriented Analysis and Design Using UML
Using Use Cases for Generating Test Cases
A test case developed for a particular function of the
software system includes a set of test input, execution
conditions, and expected results.
The role of test cases in the testing phase is:
Test cases form the foundation on which the test procedures
are designed and developed.
The effort required for testing is proportional to the number of
test cases.
The design and development of tests and the resources
required for the testing depends on the test cases.
Ver. 1.0 Slide 11 of 27
12. Object-Oriented Analysis and Design Using UML
Using Use Cases for Generating Test Cases (Contd.)
To generate test cases from use cases:
Identify the instances of a use case.
Identify the test input and expected results for each instance of
the use case.
Identify the conditions required to execute of each use case
instance.
Add test input values to complete the test cases.
Ver. 1.0 Slide 12 of 27
13. Object-Oriented Analysis and Design Using UML
Identifying Instances of a Use Case
A use case instance represents the execution of the
sequence of actions that a use case specifies.
Instances of each use case needs to be organized using a
test matrix which should contain the following information:
The instances of each use case in a numbered list.
The basic and alternate flows represented by each instance of
a use case.
Ver. 1.0 Slide 13 of 27
14. Object-Oriented Analysis and Design Using UML
Identifying the Execution Conditions for the Use Case Instances
You need to identify the execution conditions to execute
each use case instance, and then specify the state of the
execution condition.
States that can occur for an execution condition are:
– Valid (V): Specifies a condition that must be true for the basic
flow of events in the use case to execute.
– Invalid (I): Specifies a condition that invokes the alternate flow
of events in a use case.
– Not applicable (N/A): Specifies that the specified condition is
not applicable to a particular test case.
Ver. 1.0 Slide 14 of 27
15. Object-Oriented Analysis and Design Using UML
Adding Test Input Values
Adding test input values to the test matrix for a particular
test case completes the information required for executing
the test case.
Each row of the test matrix should indicate a particular test
case.
The columns of the test matrix should indicate:
Use case instances
Execution conditions
Test input values for test cases
Expected result
Actual result
Ver. 1.0 Slide 15 of 27
16. Object-Oriented Analysis and Design Using UML
Tracing Requirements
• You should trace requirements for the following two
reasons:
The customer requirements may change during the SDLC of a
project.
The implementation of a use case in an iteration may affect the
functionality of other use cases of the system.
The two approaches to perform requirements traceability
are:
– Backward: Tracing requirements from testing phase to
requirement gathering phase.
– Forward: Tracing requirements from requirement gathering
phase to testing phase.
Ver. 1.0 Slide 16 of 27
17. Object-Oriented Analysis and Design Using UML
Types of Use Cases used in an Iterative Process
Use case that can be created for an iterative model are:
– Facade use case: Created in the initial phase of requirements
gathering and captures the ad-hoc and most basic
requirements for the new system.
– Filled use case: Contain detailed information, which is not
provided in the facade use cases.
– Focused use case: Derived from the filled use cases and
describes the interaction of an actor with the software system.
Ver. 1.0 Slide 17 of 27
18. Object-Oriented Analysis and Design Using UML
Types of Use Cases used in an Iterative Process (Contd.)
Facade use cases describe software system in three terms,
information, input, and output.
Attributes that facade use cases contain are:
Use case name.
Description
Role name
Input and output
Ver. 1.0 Slide 18 of 27
19. Object-Oriented Analysis and Design Using UML
Types of Use Cases used in an Iterative Process (Contd.)
The information that a filled use case contains is:
Pre-conditions
Triggers
Actors
Basic coarse of events
Exceptions
Business rules
Ver. 1.0 Slide 19 of 27
20. Object-Oriented Analysis and Design Using UML
Types of Use Cases used in an Iterative Process (Contd.)
Activities involved in creating focused use cases are:
Merge duplicate processes
Focus on each use case
Manage scope changes
Manage risks and assumptions
Review
Ver. 1.0 Slide 20 of 27
21. Object-Oriented Analysis and Design Using UML
Demo: Refining the System Definition for the InfoSuper Bank ATM System
Problem Statement:
The InfoSuper bank needs to develop a bank ATM system to
improve their customer satisfaction level and to expand their
customer base. The task of developing the bank ATM system
has been entrusted on a development team of Janes
Technologies. The project manager of Janes Technologies
identifies the following use cases for the InfoSuper bank ATM
system:
Cash Withdrawal: Enables the bank customers to withdraw cash.
Cash Deposit: Enables the bank customer to deposit cash.
Check Deposit: Enables the bank customer to deposit check.
Transaction Summary: Enables the bank customer to get a
transaction summary.
Change PIN: Enables the bank customer to change the Personal
Identification Number (PIN) of their accounts.
Ver. 1.0 Slide 21 of 27
22. Object-Oriented Analysis and Design Using UML
Demo: Refining the System Definition for the InfoSuper Bank ATM System (Contd.)
Fund Transfer: Enables the bank customer to transfer funds within
the same bank
Checkbook Request: Enables the bank customer to request for a
checkbook.
Validation: Validates the ATM card and PIN of bank customer.
– The actors identified for the InfoSuper bank ATM system are:
– Centralized Bank System: Enables the ATM system to validate the
ATM card and PIN and verify the balance of the bank customer. It
also enables the ATM system to make transactions, such as cash
withdrawal and cash deposit. Centralized Bank System is external
to the ATM system and interacts with the ATM system. Therefore,
it is an actor.
– Bank Customer: Requests for the various services, such as cash
withdrawal and deposit, offered by the system. In addition, enters
the PIN number for accessing the services.
Ver. 1.0 Slide 22 of 27
23. Object-Oriented Analysis and Design Using UML
Demo: Refining the System Definition for the InfoSuper Bank ATM System (Contd.)
InfoSuper bank wants Janes Technologies to develop a
prototype of the few basic functionalities of the proposed
software system before proceeding with the final software
development. The functionalities that the InfoSuper bank wants
in the ATM prototype are:
The ATM should allow customers to withdraw cash from the
current and savings account
The ATM should allow customers to change their PIN
The ATM should allow customers to obtain a transaction summary
Ver. 1.0 Slide 23 of 27
24. Object-Oriented Analysis and Design Using UML
Demo: Refining the System Definition for the InfoSuper Bank ATM System (Contd.)
The project manager of Janes Technologies, Jennifer, adopts
an iterative approach for the development of the software
system. Jennifer decides to deliver the prototype after the
second iteration of the software development life cycle. In the
first iteration, Jennifer plans to implement the required
functionalities for the savings accounts only. In the second
iteration, she plans to implement the required functionalities for
the current accounts as well. Before developing the prototype,
Jennifer needs to create a design for the prototype.
Ver. 1.0 Slide 24 of 27
25. Object-Oriented Analysis and Design Using UML
Demo: Refining the System Definition for the InfoSuper Bank ATM System (Contd.)
Solution:
To design the prototype for the ATM system, you need to
perform the following tasks:
Identify the System Boundary for the first iteration and create the
corresponding Use Case diagram.
Refine the Use Case diagram for the first iteration.
Identify the System Boundary for the second iteration.
Create the Use Case diagram for the first and second iterations
using Visio.
Ver. 1.0 Slide 25 of 27
26. Object-Oriented Analysis and Design Using UML
Summary
In this session, you learned that:
The system boundary enables you to identify the iterations
involved in SDLC based on the priority of use cases.
The scope of a project depends on the objective of the project,
the available resources, and the time specified for its
completion. You need to establish the project scope before
implementing the design of the system.
To refine the system definition, you refine the use cases
identified for the system.
The extend and include relationships are established among
use cases to refine the system definition.
Ver. 1.0 Slide 26 of 27
27. Object-Oriented Analysis and Design Using UML
Summary (Contd.)
In the design phase, you realize a use case to understand how
the functions of the use case, which cannot be translated
directly into code, can be achieved.
In UML, use case realizations are modeled using
collaborations.
Collaboration is a collection of classes, interfaces, and sub-
systems that interact to implement the functions of a use case.
Use Cases are used to generate test cases.
Requirements are traced to ensure that the developed system
fulfills the needs of the customer adequately.
There are two approaches to trace requirements, backward
and forward requirements traceability.
Ver. 1.0 Slide 27 of 27
Notas del editor
Initiate the session by explaining the session objectives.
Introduce the topic by telling the students that in this session they will learn how to migrate from the requirements analysis phase to the design phase of software development. The concepts related to this will be explained using the hospital administration system case study.
Explain how to identify the system boundary for successive iterations of the software system by using the hospital administration system case study. Students might get confused when they identify the system boundary for the different iterations of the software system. You can use the example of the bookshop automation system to illustrate this concept. The bookshop automation system helps the bookshop employees to query whether or not a book is available in the stock. If the book is available, the rack number in which the book is placed is displayed. The bookshop automation system also maintains the price of various books in the database. When a customer selects a book for purchase, the bookshop employee enters the title of the book. In response to this, the bookshop automation system updates the stock and generates the sales receipt. The reorder level for all the books is set to five. The bookshop automation system enables the employees of the inventory section to update the stock whenever a new supply arrives. In addition, the bookshop automation system generates the sales statistics that include fields, such as the book name, publisher name, ISBN number, copies sold, and sales revenue. The sales statistics will help the bookshop owner to know the business done over a period and determine the inventory level required for various books. The use cases for the bookshop automation system are: * Search Book * Update Stock * Generate Sales Receipt * Update Reorder List * Generate Sales Statistics * Bookshop Administration The Bookshop Administration use case facilitates the software system to update the stock, update the list of books that need to be ordered, prepares the sales statistics, and prepares the bill. The actors for the bookshop automation system are: * Customer * Bookshop Employee * Inventory Employee * Bookshop Owner You can implement the following use cases in the first iteration because these use cases model the basic features of the bookshop automation system: * Search Book * Update Stock * Bookshop Administration * Generate Sales Receipt The actors for the first iteration are: * Customer * Bookshop Employee The following figure shows the system boundary for the first iteration of the bookshop automation system. <<<<<<FIGURE TO BE INSERTED>>>>>> The above figure depicts that the secondary actor, Customer, queries the actor, Bookshop Employee, for the availability of a book. The actor, Bookshop Employee, enters a query for the book. The Search Book use case provides the result for the query. If the customer purchases the book, the Bookshop Employee requests the software system to generate a sales receipt using the Generate Sales Receipt use case. Next, the Generate Sales Receipt use case triggers the Bookshop Administration use case to update the stock of the book purchased. In the second iteration, you can add the following use cases to the prototype developed in the first iteration: * Update Reorder List * Generate Sales Statistics The actors for the second iteration of the bookshop automation system are: * Customer * Bookshop Employee * Inventory Employee * Bookshop Owner The following figure shows the system boundary for the second iteration of the bookshop automation system. <<<<<<<Insert Figure>>>>>> The above figure depicts that the Bookshop Administration use case updates the reorder list for books when the reorder level for a particular book is reached. When new stock arrives, the actor, Inventory Employee, enters data using the Update Stock use case and the Bookshop Administration use case updates the stock. The actors, Bookshop Employee and Bookshop Owner, request the Bookshop Administration use case to generate the sales statistics.
Explain how to identify the system boundary for successive iterations of the software system by using the hospital administration system case study. Explain the concept of priority, effort, and impact of requirements in context of the hospital management case study.
Explain the process of refining the system definition by using the hospital administration system case study.
Explain the steps to refine a use case by using an example.
Explain the extend relationship between use cases in context of the hospital administration system case study. Tell the student that the direction of the arrow in the extend relationship points to the use case that is extended to obtain another use case.
Explain the include relationship between use cases in context of the hospital administration system case study. Tell the student that the direction of the arrow in the include relationship points to the use case that is included in another use case. Also explain that when the existing use case is executed, included use case is also executed. However, in case of the extended use case, this is not true.
Explain how use cases are realized using classes, interfaces, and sub-systems in the design phase. Explain the use of collaborations in modeling use case realizations. Explain the UML notation for a collaboration. Explain the concept of a collaboration by using the example of hospital administration system case study given in the student guide.
Explain the components of a test case and the role of test cases in the testing phase. Tell the students that use case specifications can be used to generate test cases for testing a software system.
Explain the steps to generate test cases from use cases.
Explain what is meant by a use case instance. Next explain how to organize the instances of a use case in a test matrix by using the example given in the student guide.
Explain how to list the execution conditions and their states for the instances of a use case in a test matrix by using the example given in the student guide.
Explain how to add test input values to the test matrix by using the example given in the student guide.
Explain what requirements traceability is. Then explain why requirements need to be traced. Also explain the backward and forward approaches to requirement traceability by using the example given in the student guide.
Explain the three types of use cases.
Explain the attributes of a façade use case.
Explain the information contained in a filled use case.
Explain the activities that need to be performed to create focused use cases.
Explain the problem statement given on the slide to the students.
Demonstrate the solution by performing the steps given in the student guide. The data file for this activity is provided in the TIRM CD. The path for the data file is: <<<<<PATH>>>>>
Summarize the session by using the summary points given on the slide.