Anda di halaman 1dari 27

<?xml version="1.0" encoding="UTF-8"?

>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ops="http://www.idpf.org/2007/ops">
<head>
<title>Object-Oriented Analysis and Design Using UML: Student Guide</title>
<link rel="stylesheet" type="text/css" href="css/Style.css"/>
<link rel="stylesheet" type="application/vnd.adobe-page-template+xml"
href="page-template.xpgt"/>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf8"/>
<script
src="http://www.niitstudent.com/india/NDCR2/webReaderApplication.Web/JQuery_Sc
ript/jquery-1.7.1.min.js" type="text/javascript"></script>
<script
src="http://www.niitstudent.com/india/NDCR2/webReaderApplication.Web/JQuery_Sc
ript/GlobalContentSecrity.js" type="text/javascript"></script>
<script src="http://www.niitstudent.com/india/Content/analytics.js"
type="text/javascript"></script>
</head>
<body>
<h3 class="chno" id="ch04"><em>Chapter 4</em></h3>
<h1 class="chname">Migrating from Requirements to Design</h1>
<p class="nonindent">Work in the design phase can start after analyzing the
requirements of a software system in the requirements analysis phase. Before
starting work in the design phase, you need to determine the system boundaries
and the scope of your project so that you can complete the project within the
specified time period. In addition, you need to refine the system definition, which
was created by using use case diagrams in the initial stages of the development
process.</p>
<p class="nonindent">This chapter discusses how to determine the system
boundaries and the project scope. In addition, it explains how to refine the system
definition by refining the use case diagrams.</p>
<h2 class="section-head2">Objectives</h2>
<p class="nonindent">In this chapter, you will learn to:</p>

<p class="hanging"><img class="inline" src="images/page.jpg"


alt=""/>&#x00A0;&#x00A0;&#x00A0;&#x00A0;Set the system boundaries and
project scope</p>
<p class="hanging"><img class="inline" src="images/page.jpg"
alt=""/>&#x00A0;&#x00A0;&#x00A0;&#x00A0;Refine the system definition</p>
<p class="pagebreak">&#x00A0;</p>
<h1 class="chapter-head1" id="ch04s01">Setting Boundaries and Project
Scope</h1>
<p class="nonindent">In the requirements modeling phase, you create a use case
diagram to depict the base level interaction among the actors and use cases of the
proposed system. In the design phase, you identify the iterations in which each
requirement will be implemented. In addition, you create use case diagrams to
depict the interaction among the use cases and actors in each iteration.</p>
<p class="nonindent">The use cases and actors defined for a particular iteration
might be different from the use cases and actors defined for another iteration of the
system. To depict the functions in terms of use cases and actors, you set the system
boundaries for each iteration of the system.</p>
<p class="nonindent">In addition, when you design a complex system, you may
need to divide the system into independent sub-systems. In such a case, the system
boundary enables you to clearly demarcate which sub-system is being
modeled.</p>
<p class="nonindent">After you set the system boundary, you need to establish a
scope for the software system. The scope includes estimating the resources
required to complete a project within the stipulated time.</p>
<h2 class="section-head2" id="ch04s01s01">Identifying System Boundary</h2>
<p class="nonindent">The system boundary enables you to focus on the functions
performed by the software system in each iteration. You represent the system
boundary using a rectangular box around the use cases in the use case diagram.
You place the actors outside the system boundary and put a label with the name of
the system inside the system boundary. The following figure shows the system
boundary surrounding <span class="cour">Use Case A</span> and <span
class="cour">Use Case</span> <span class="cour">B</span>.</p>
<p class="center"><img src="images/4.3.jpg" alt=""/></p>
<p class="nonindent">The steps to identify the system boundary are:</p>
<ol class="arabic">
<li>Prioritize the use cases of the system. The use cases that implement the basic
features of the software system have the highest priority.</li>

<li>Identify the iterations to develop the system. The first iteration includes the
basic use cases of the system and the successive iterations include the remaining
use cases according to their priority.</li>
<li>Identify the interaction among the use cases and actors of each iteration.</li>
</ol>
<p class="nonindent">To identify the system boundary, consider the example of
the hospital administration system, which needs to be developed in multiple
iterations. The use cases identified for the hospital administration system at the
requirements analysis phase are:</p>
<ul class="square">
<li><strong>Give Appointment</strong>: Gives an appointment to the patient
using the automated voice response system.</li>
<li><strong>Accept Fee</strong>: Accepts payment from patients for the services
of the doctor.</li>
<li><strong>Reordering Medicines</strong>: Orders medicines whenever the
medicines reach the reorder level.</li>
<li><strong>Print Slip</strong>: Prints the prescription on the doctor&#x0027;s
computer.</li>
<li><strong>Accept Payment</strong>: Accepts payment from patients for the
purchased medicines.</li>
<li><strong>Modify Schedule</strong>: Enables the doctor to enter new
information or modify the existing information in the schedule.</li>
</ul>
<p class="nonindent">Based on the priority of use cases identified in the
requirements phase, you can identify various iterations for the hospital
administration system. For example, in the first iteration, you may decide to
implement the following requirements:</p>
<ul class="square">
<li>Accept telephone calls from patients to give new appointments and cancel the
existing appointments.</li>
<li>Automatically modify the schedule. The doctor should be notified about the
change in schedule due to the cancellation of any appointments. If the doctor still
wants to change the schedule, then all the affected appointments should be
cancelled and the patients should be informed accordingly.</li>
</ul>
<p class="nonindent">The use cases required to implement the requirements of
the first iteration are:</p>

<ul class="square">
<li>Give Appointment</li>
<li>Modify Schedule</li>
</ul>
<p class="nonindent">The <span class="cour">Give Appointment</span> use
case gives appointments to patients. The <span class="cour">Modify
Schedule</span> use case enables doctors to modify the schedule.</p>
<p class="nonindent">The actors identified for the first iteration of the hospital
administration system are:</p>
<ul class="square">
<li>Patient</li>
<li>Doctor</li>
</ul>
<p class="nonindent">The following figure depicts the use case diagram with the
system boundary for the first iteration of the hospital administration system.</p>
<p class="center"><img src="images/4.5a.jpg" alt=""/></p>
<p class="nonindent">In the second iteration, you can add the printing the
prescribed medication slip requirement to the prototype developed in the first
iteration. The <span class="cour">Print Slip</span> use case is required to
implement the additional requirement of the second iteration. The actors of the
second iteration are <span class="cour">Patient</span> and <span
class="cour">Doctor</span>. The following figure depicts the use case diagram
with the system boundary for the second iteration of the hospital administration
system.</p>
<p class="center"><img src="images/4.5b.jpg" alt=""/></p>
<p class="nonindent">In the third iteration, you can add the following
requirements to the prototype developed in the second iteration:</p>
<ul class="square">
<li>Accept fee from the patient for the services of the doctor</li>
<li>Print fee receipt for the patient</li>
</ul>
<p class="nonindent">The use cases identified to implement the additional
requirements of the third iteration are:</p>
<ul class="square">

<li><strong>Accept Fee</strong>: Enables patients to use their credit cards to


make payment for the availed services of the doctor.</li>
<li><strong>Print Fee Receipt</strong>: Enables patients to obtain a fee receipt in
return of payment.</li>
</ul>
<p class="nonindent">The following figure depicts the use case diagram with the
system boundary for the third iteration of the hospital administration system.</p>
<p class="center"><img src="images/4.6.jpg" alt=""/></p>
<h4 class="note"><img src="images/note1.jpg" alt=""/></h4>
<p class="note1"><em>Similarly, you can create the use case diagram depicting
the system boundary for the fourth iteration of any software system</em>.</p>
<h2 class="section-head2" id="ch04s01s02">Establishing Project Scope</h2>
<p class="nonindent">It is important to establish the project scope before you
develop the project. This ensures that all the requirements of the project are fulfilled
in time and with the available resources. The project scope is a function of:</p>
<ul class="square">
<li><strong>Project functions</strong>: Refer to the objectives that the
deliverable product should fulfill.</li>
<li><strong>Project resources</strong>: Refer to the resources that are available
for project development.</li>
<li><strong>Available time</strong>: Refers to the time in which the project
should be completed.</li>
</ul>
<p class="nonindent">The project scope is achievable when the efforts required to
complete the project are equivalent to the resources available during the scheduled
time. For example, in the hospital administration system, the resources available for
the project development are centralized database, programmers, testers, and
quality assurance personnel. The centralized database maintains a schedule of
doctors. A specified period for the completion of the project has been defined. If the
development team concludes that the available resources will fulfill the objectives
of the project in the scheduled time, then the project scope for the hospital
administration system is declared as achievable.</p>
<p class="nonindent">In an iterative approach, you need to establish the project
scope for each of the iteration. To establish a project scope:</p>
<ol class="arabic">
<li>Identify the requirements of the system.</li>

<li>Set priorities for the requirements to identify successive iterations.</li>


<li>Assess the efforts required to implement the requirements.</li>
<li>Analyze the impact of implementing each requirement of the system.</li>
</ol>
<p class="nonindent">When you establish the project scope, you need to estimate
the impact of implementing each additional requirement in the project. This is
because when a new requirement is implemented in the project, the scheduled time
and/or the estimated budget of the project can be adversely affected. For example,
you can add the following requirements in successive iterations of the hospital
administration system:</p>
<ul class="square">
<li>Check whether or not the end users, such as the receptionist and other doctors,
are authorized to access a doctor&#x0027;s schedule.</li>
<li>Provide a user-friendly interface at the credit card counters where the patients
make payments for medicines and doctors&#x2019; services.</li>
</ul>
<p class="nonindent">The use cases identified for the preceding requirements are
Verify End User and Provide User-Friendly Interface. The impact of implementing the
use cases may be:</p>
<ul class="square">
<li>The hospital administration system needs to maintain a database to store the
information about the end users who access the schedules of the doctors.</li>
<li>The hospital administration system needs to implement validations for the userfriendly interface to authenticate that the patients input the correct
information.</li>
</ul>
<p class="nonindent">When you implement the requirements, if an absolute
measure for priorities, efforts, and impact is not available, you can provide a
relative measure. For example, you can use the terms, such as critical, important,
and useful, to indicate the priority of a requirement. The following table lists the
priorities, efforts, and impact of implementing the two additional requirements of
the hospital administration system.</p>
<p class="center"><img src="images/4.8.jpg" alt=""/></p>
<h4 class="note"><img src="images/jam.jpg" alt=""/></h4>
<h4 class="note1"><strong><em>Just a minute:</em></strong></h4>

<p class="note4"><em>Which of the following refers to the objectives that the


deliverable product should fulfill?</em></p>
<p class="note4"><em>1</em>. <em>Project Functions</em></p>
<p class="note4"><em>2</em>. <em>Project Reports</em></p>
<p class="note4"><em>3</em>. <em>System Boundary</em></p>
<p class="note4"><em>4</em>. <em>Available Time</em></p>
<h4 class="note6"><strong><em>Answer:</em></strong></h4>
<p class="note4"><em>1</em>. <em>Project Functions</em></p>
<p class="pagebreak">&#x00A0;</p>
<h1 class="chapter-head1" id="ch04s02">Refining the System Definition</h1>
<p class="nonindent">After setting system boundary and establishing the project
scope, you may need to refine the software system definition. This is because the
use cases that are defined in the initial iterations of the development process may
not be elaborate and specific due to inadequate information about the software
system. You require detailed and specific information to design, code, and test the
software system. To refine the software system definition, you refine use cases and
establish relationships among use cases.</p>
<h2 class="section-head2" id="ch04s02s01">Refining Use Cases</h2>
<p class="nonindent">The task of re-factoring and reviewing the requirements to
obtain well-defined and specific use cases is known as refining use cases. To refine
use cases, you need to perform the following steps:</p>
<ol class="arabic">
<li>Review the actors of the use cases. This enables you to redefine the function of
the actors to make the function more specific.</li>
<li>Review the names of the use cases. This enables you to rename the use cases
to make them descriptive.</li>
<li>Refine the description of the use cases. This enables you to redefine the
functions of the use cases to make the functions more specific.</li>
<li>Define and refine the flow of events. This enables you to accurately identify the
flow of events for a use case.</li>
<li>Identify alternate paths. This enables you to identify the alternate flow of
events that you may use to achieve the functions of a use case.</li>
<li>Identify preconditions and post conditions. This enables you to identify the
conditions that must be true before the operation of a use case is triggered and the
conditions that must be true after the operation of a use case is completed.</li>

<li>Identify the non-functional requirements, such as reliability and performance of


a system.</li>
</ol>
<h4 class="section">Establishing Relationship Among Use Cases</h4>
<p class="nonindent">You can also establish relationships among use cases to
further refine the software system definition. The following relationships can be
established among use cases:</p>
<ul class="square">
<li><p><strong>Extend</strong>: Indicates that an existing use case is extended
by additional behavior to obtain another use case. The extend relationship exists
among use cases when the functions of a use case, which is implemented in initial
iterations, are enhanced in successive iterations.</p>
<p>For example, if <span class="cour">Use Case A</span> is implemented in the
first iteration and is extended in the second iteration to obtain <span
class="cour">Use Case B</span>, the two use cases have an extend relationship,
as shown in the following figure.</p>
<p class="center"><img src="images/4.10a.jpg" alt=""/></p>
</li>
<li><p><strong>Include</strong>: Indicates that the functions of one use case
are included in the functions of another. The include relationship exists among use
cases when the functions of a particular use case are required by another use case.
For example, if the functions of <span class="cour">use case B</span> are
required by <span class="cour">Use Case A</span>, then use case A includes
<span class="cour">Use Case B</span>. In such a scenario, the two use cases
have an include relationship, as shown in the following figure.</p>
<p class="center"><img src="images/4.10b.jpg" alt=""/></p>
</li>
</ul>
<h4 class="note"><img src="images/note1.jpg" alt=""/></h4>
<p class="note1"><em>The direction of the arrow in the extend relationship points
to the use case that is extended to obtain another use case. In addition, the
direction of the arrow in the include relationship points to the use case that is
included in another use case</em>.</p>
<p class="note1"><em>When the existing use case is executed, the extending use
case may or may not execute. However, an included use case executes whenever
the existing use case is executed</em>.</p>
<p class="nonindent">You need to recreate the use case diagrams after
establishing extend and include relationships among use cases. For example, in the

use case diagram of the first iteration of the hospital administration system, a
<span class="cour">Check Schedule</span> use case needs to be created, the
functions of which are required in the functions of the <span class="cour">Give
Appointment</span> use case and the <span class="cour">Modify
Schedule</span> use case. For this reason, the <span class="cour">Check
Schedule</span> use case can be included in the <span class="cour">Give
Appointment</span> use case and the <span class="cour">Modify
Schedule</span> use case. The following figure depicts the new use case diagram
for the first iteration of the hospital administration system.</p>
<p class="center"><img src="images/4.11.jpg" alt=""/></p>
<h4 class="note"><img src="images/note1.jpg" alt=""/></h4>
<p class="note1"><em>The second iteration use case diagram has not been
refined as it does not contain include or extend relationship</em>.</p>
<p class="nonindent">In the third iteration, the <span class="cour">Print Fee
Receipt</span> and <span class="cour">Accept Fee</span> use cases are added
to the prototype developed in second iteration. The <span class="cour">Print
Slip</span> use case of the second iteration can be extended to obtain the <span
class="cour">Print Fee Receipt</span> use case of the third iteration.</p>
<p class="nonindent">The following figure depicts the use case diagram for the
third iteration of the hospital administration system.</p>
<p class="center"><img src="images/4.12.jpg" alt=""/></p>
<h2 class="section-head2" id="ch04s02s02">Realizing Use Cases in the Design
Phase</h2>
<p class="nonindent">In the implementation phase, you need to incorporate the
functions of the refined use cases into code. Therefore, in the design phase, you
need to understand how the functions of a use case can be implemented using
classes, interfaces, and sub-systems in the implementation phase. This is called
realizing use cases.</p>
<p class="nonindent">UML provides specific modeling constructs, known as
collaborations, 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
achieve the functions of a use case.</p>
<p class="nonindent">The following figure shows the graphical representation of
collaboration in UML.</p>
<p class="center"><img src="images/4.13a.jpg" alt=""/></p>
<p class="nonindent">Collaboration represents the following aspects of use
cases:</p>
<ul class="square">

<li><strong>Structural</strong>: Describes the static structure of a system that


includes the role of classes, interfaces, and sub-systems in use cases.</li>
<li><strong>Behavioral</strong>: Describes the dynamic structure of the system
that specifies the interaction among the classes, interfaces, and sub-systems of use
cases.</li>
</ul>
<p class="nonindent">Consider the example of the <span class="cour">Modify
Schedule</span> use case of the hospital administration system. You need to
realize this use case in the design phase before its functions are implemented in the
implementation phase.</p>
<p class="nonindent">The following figure shows the association between the
<span class="cour">Modify Schedule</span> use case and its use case
realization.</p>
<p class="center"><img src="images/4.13b.jpg" alt=""/></p>
<p class="nonindent">The preceding figure indicates the <span
class="cour">Modify Schedule</span> collaboration with its respective
participating classes. In other words, to realize the <span class="cour">Modify
Schedule</span> use case, you need to identify the classes, such as <span
class="cour">Appointment</span> and <span class="cour">Scheduler</span>,
which will implement the functions of the use case.</p>
<h2 class="section-head2" id="ch04s02s03">Using Use Cases for Generating Test
Cases</h2>
<p class="nonindent">In the testing phase, the testers prepare test cases to
examine whether or not the implemented code of the software system complies
with the requirements stated by the customer. A test case developed for a particular
function of the software system includes a set of test input, execution conditions,
and expected results. The quality of the software system depends on the accuracy
with which test cases are designed, created, and executed.</p>
<p class="nonindent">The role of test cases in the testing phase is:</p>
<ul class="square">
<li>Test cases form the foundation on which the test procedures are designed and
developed. Test procedures are a set of detailed instructions for the setup,
execution, and evaluation of results for a particular test case.</li>
<li>The effort required for testing is proportional to the number of test cases.</li>
<li>The design and development of tests and the resources required for the testing
depend on the test cases.</li>
</ul>

<p class="nonindent">You use the use cases to generate test cases. A use case
model that records all the use cases of the system, how the use cases interact, and
how the actors initiate the use cases provides useful information for creating test
cases. The following information about use cases enables you to generate test
cases:</p>
<ul class="square">
<li>Basic flow of events and all the alternate flows.</li>
<li>Descriptions of preconditions and post conditions for the functions of a use
case.</li>
<li>Non-functional requirements, such as performance, reliability, usability, and
supportability of the system.</li>
</ul>
<h4 class="note"><img src="images/note1.jpg" alt=""/></h4>
<p class="note1"><em>A related set of test cases is known as a test
scenario</em>.</p>
<p class="nonindent">To generate test cases from use cases, you need to perform
the following tasks:</p>
<ol class="arabic">
<li>Identify the instances of a use case.</li>
<li>Identify the test input and expected results for each instance of the use
case.</li>
<li>Identify the conditions required to execute each use case instance.</li>
<li>Add test input values to complete the test cases.</li>
</ol>
<h4 class="section">Identifying the Instances of a Use Case</h4>
<p class="nonindent">A use case instance represents the execution of the
sequence of actions that a use case specifies. You need to organize the instances of
each use case using a test matrix that should contain the following
information:</p>
<ul class="square">
<li>The instances of each use case in a numbered list.</li>
<li>The basic and alternate flows represented by each instance of a use case.</li>
</ul>

<p class="nonindent">For example, in the hospital administration system, an


instance of the <span class="cour">Give Appointment</span> use case represents
the following sequence of actions:</p>
<ol class="arabic">
<li>The patient makes a call to take an appointment.</li>
<li>The software system asks for the age of the patient.</li>
<li>The patient enters the age.</li>
<li>The software system checks the schedule of the doctor and gives the
appointment accordingly.</li>
</ol>
<p class="nonindent">Another instance of the <span class="cour">Give
Appointment</span> use case may represent the following sequence of
actions:</p>
<ol class="arabic">
<li>The patient makes a call to take an appointment.</li>
<li>The software system asks for the age of the patient.</li>
<li>The patient enters an invalid age, such as zero.</li>
<li>The software system will generate an error and prompt the patient to enter a
valid age.</li>
</ol>
<p class="nonindent">The two instances of the <span class="cour">Give
Appointment</span> use case can be organized in the following test matrix.</p>
<p class="center"><img src="images/4.16.jpg" alt=""/></p>
<h4 class="note"><img src="images/note1.jpg" alt=""/></h4>
<p class="note1"><em>In the preceding example, only two instances have been
created. However, other instances can also be created. For example, age less than
14 and age greater than 14 are also separate instances</em>.</p>
<h4 class="section">Identifying the Execution Conditions for the Use Case
Instances</h4>
<p class="nonindent">You need to identify the execution conditions to execute
each use case instance, and then specify the state of the execution condition. The
states that can occur for an execution condition are:</p>
<ul class="square">
<li><strong>Valid (V)</strong>: Specifies a condition that must be true for the
basic flow of events in the use case to execute.</li>

<li><strong>Invalid (I)</strong>: Specifies a condition that invokes the alternate


flow of events in a use case.</li>
<li><strong>Not Applicable (N/A)</strong>: Indicates that the specified condition
is not applicable to a particular test case.</li>
</ul>
<p class="nonindent">The execution conditions for the instances of the <span
class="cour">Give Appointment</span> use case are:</p>
<ul class="square">
<li>The patient enters a valid age.</li>
<li>An appointment is available in the doctors&#x2019; schedule.</li>
</ul>
<p class="nonindent">The following test matrix lists the execution conditions and
their states for the instances of the <span class="cour">Give Appointment</span>
use case.</p>
<p class="center"><img src="images/4.17.jpg" alt=""/></p>
<h4 class="section">Adding Test Input Values</h4>
<p class="nonindent">When you add test input values to the test matrix for a
particular test case, it completes the information required to execute the test case.
For example, in the hospital administration system, the test input is the age of the
patient. Therefore, the test cases can have several test input values, such as 10, 14,
and 19.</p>
<p class="nonindent">The following test matrix lists the test cases for the two
instances of the <span class="cour">Give Appointment</span> use case.</p>
<p class="center"><img src="images/4.18.jpg" alt=""/></p>
<p class="nonindent">Each row of the preceding test matrix indicates a particular
test case and the columns indicate use case instances, execution conditions, test
input values for test cases, and expected and actual results.</p>
<h4 class="note"><img src="images/note1.jpg" alt=""/></h4>
<p class="note1"><em>The originating and alternate flows are indicated using
only the instance number. You may add the originating and alternate flows in the
test matrix</em>.</p>
<h2 class="section-head2" id="ch04s02s04">Tracing Requirements</h2>
<p class="nonindent">In requirements traceability, the customer requirements are
mapped to the features of the software system to ensure that all the requirements
are identified correctly. The use cases are mapped to the requirements to ensure
that use cases for all the requirements are identified. The code is mapped to the use

cases to verify that the code correctly implements the functions of all the use cases.
The test cases are also mapped to the use cases to verify whether or not all the use
cases have been tested. You need to trace requirements for the following two
reasons:</p>
<ul class="square">
<li>The customer requirements may change during the SDLC of a project.</li>
<li>The implementation of a use case in an iteration may affect the functions of the
other use cases of the system.</li>
</ul>
<p class="nonindent">To perform requirements traceability, you can use the
following two approaches:</p>
<ul class="square">
<li><strong>Backward</strong>: Involves tracing requirements from the testing
phase to the requirement gathering phase.</li>
<li><strong>Forward</strong>: Involves tracing requirements from the
requirement gathering phase to the testing phase.</li>
</ul>
<p class="nonindent">For example, to perform backward requirements traceability
in the hospital administration system, you need to verify whether or not the
identified test cases are adequate to test all the use cases. The test case identified
for the <span class="cour">Give Appointment</span> use case checks whether or
not the software system performs the following actions:</p>
<ul class="square">
<li>Asks for the age of the patient</li>
<li>Checks the schedule of the doctor</li>
<li>Gives an appointment accordingly</li>
</ul>
<p class="nonindent">The code should implement all the use cases of the hospital
administration system. You need to ensure that the use cases of the hospital
administration system map to the requirements of the desired software system.
Finally, you also verify that the requirements identified map to the features of the
software system.</p>
<h2 class="section-head2" id="ch04s02s05">Types of Use Cases used in an
Iterative Process</h2>
<p class="nonindent">Use cases evolve during iterative requirements gathering.
You can create the following use cases for an iterative model:</p>

<ul class="square">
<li>Facade use case</li>
<li>Filled use case</li>
<li>Focused use case</li>
</ul>
<h4 class="section">Facade Use Case</h4>
<p class="nonindent"><span class="cour">Facade</span> use cases describe the
software system in three terms: information, input, and output. You can also include
actors in a <span class="cour">facade</span> use case. You create facade use
cases in the initial phase of the requirements gathering process and, therefore, they
capture the ad-hoc and most basic requirements for the new system. The attributes
that facade use cases contain are:</p>
<ul class="square">
<li><strong>Use case name</strong>: Describes the function name, which is
implemented by the use case, in the customer terminology.</li>
<li><strong>Description</strong>: Describes the purpose and output of the use
case functions.</li>
<li><strong>Role name</strong>: Provides additional information about the role of
the actor involved in the association relationship with the use case.</li>
<li><strong>Input and output</strong>: Indicates the input and output of the
process modeled by the use case.</li>
</ul>
<h4 class="section">Filled Use Case</h4>
<p class="nonindent"><span class="cour">Filled</span> use cases are evolved
from facade use cases and they contain detailed information that is not provided in
the facade use cases. The information that a filled use case contains is:</p>
<ul class="square">
<li>Pre-conditions</li>
<li>Triggers</li>
<li>Actors</li>
<li>Basic course of events</li>
<li>Exceptions</li>
<li>Business rules</li>
</ul>

<h4 class="section">Focused Use Case</h4>


<p class="nonindent"><span class="cour">Focused</span> use cases are
derived from the filled use cases because they eliminate redundant information. It is
pertinent to note that focused use cases describe the interaction of an actor with
the software system. Each interaction in the focused use case provides a solution to
a set of business problems. Focused use cases are clear and contain the final
requirements. There is no additional information and the focus of the system is
apparent. The activities that you should perform to create focused use cases
are:</p>
<ul class="square">
<li><strong>Merge duplicate processes</strong>: Merge use cases that are
dependent on each other. For example, if there is a use case that uses the functions
of another use case, then you can merge the two use cases.</li>
<li><strong>Focus on each use case</strong>: Ensure that the use case
description is complete and provides sufficient information. In addition, make sure
that the use case depicts the interaction with other software systems.</li>
<li><strong>Manage scope changes</strong>: Identify the use cases that cause a
change in the requirements. A change in the requirement can increase or decrease
the project scope.</li>
<li><strong>Manage risks and assumptions</strong>: Track the risks and
assumptions that you have made to achieve the functions specified in the use
case.</li>
<li><strong>Review</strong>: Verify whether or not the use case contains the
necessary and correct information.</li>
</ul>
<p class="pagebreak">&#x00A0;</p>
<h1 class="chapter-head1" id="ch04s03">Activity: Refining the System Definition
for the InfoSuper Bank ATM System</h1>
<h4 class="section" id="ch04s03s01">Problem Statement</h4>
<p class="nonindent">The InfoSuper bank needs to develop a bank ATM system to
improve the customer satisfaction level and to expand the customer base. The task
of developing the bank ATM system has been entrusted to a development team
called Janes Technologies. The project manager of Janes Technologies identifies the
following use cases for the InfoSuper bank ATM system:</p>
<ul class="square">
<li><strong>Cash Withdrawal</strong>: Enables the bank customer to withdraw
cash.</li>

<li><strong>Cash Deposit</strong>: Enables the bank customer to deposit


cash.</li>
<li><strong>Check Deposit</strong>: Enables the bank customer to deposit
checks.</li>
<li><strong>Transaction Summary</strong>: Enables the bank customer to get a
transaction summary.</li>
<li><strong>Change PIN</strong>: Enables the bank customer to change the
Personal Identification Number (PIN) of their account.</li>
<li><strong>Fund Transfer</strong>: Enables the bank customer to transfer funds
within the same bank.</li>
<li><strong>Checkbook Request</strong>: Enables the bank customer to request
for a checkbook.</li>
<li><strong>Validation</strong>: Validates the ATM card and PIN of the bank
customer.</li>
</ul>
<p class="nonindent">The actors identified for the InfoSuper bank ATM system
are:</p>
<ul class="square">
<li><strong>Centralized Bank System</strong>: 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. The Centralized Bank System is external to the ATM system and interacts
with the ATM system. Therefore, it is an actor.</li>
<li><strong>Bank Customer</strong>: Requests for the various services, such as
cash withdrawal and deposit, offered by the system. In addition, the bank customer
enters the PIN number to access the services.</li>
</ul>
<p class="nonindent">InfoSuper bank wants Janes Technologies to develop a
prototype of the few basic functions of the proposed software system before
proceeding with the final software development. The functions that the InfoSuper
bank wants in the ATM prototype are:</p>
<ul class="square">
<li>The ATM should allow customers to withdraw cash from the current and savings
account.</li>
<li>The ATM should allow customers to change their PIN.</li>
<li>The ATM should allow customers to obtain a transaction summary.</li>

</ul>
<p class="nonindent">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 functions only
for the savings accounts. In the second iteration, she plans to implement the
required functions for the current accounts as well. Before developing the prototype,
Jennifer needs to create a design for the prototype.</p>
<p class="nonindent"><strong>Prerequisite</strong>: To perform this activity,
you will need the <strong>BANK_ATM.vsd</strong> file, which you created in the
activity &#x201C;Identifying Requirements and Creating a Use Case Diagram for
the Infosuper Bank&#x201D; of <a class="hlink" href="09_ch03.htm">Chapter
3</a>.</p>
<h4 class="section" id="ch04s03s02">Solution</h4>
<p class="nonindent">To design the prototype for the ATM system, you need to
perform the following tasks:</p>
<ol class="arabic">
<li>Identify the system boundary for the first iteration and create the
corresponding use case diagram.</li>
<li>Refine the use case diagram for the first iteration.</li>
<li>Identify the system boundary for the second iteration.</li>
<li>Create the use case diagram for the first and second iterations using Visio.</li>
</ol>
<h5 class="section">Task 1: Identifying the System Boundary for the First
Iteration</h5>
<p class="nonindent">To identify the system boundary for the first iteration, you
need to identify the use cases and sctors. The use cases for the first iteration
are:</p>
<ul class="square">
<li>Cash Withdrawal(Savings)</li>
<li>PIN change(Savings)</li>
<li>Transaction Summary(Savings)</li>
</ul>
<p class="nonindent">The Actors for the first iteration are:</p>
<ul class="square">

<li>Bank Customer</li>
<li>Centralized Bank System</li>
</ul>
<p class="nonindent">The following figure shows the System Boundary for the first
iteration of the ATM system.</p>
<p class="center"><img src="images/4.24a.jpg" alt=""/></p>
<h5 class="section">Task 2: Refine the Use Case Diagram</h5>
<p class="nonindent">In the first iteration, the <span class="cour">Cash
Withdrawal (Savings)</span>, <span class="cour">Change PIN (Savings)</span>,
and <span class="cour">Transaction Summary (Savings)</span> Use Cases are
using the functions of the <span class="cour">Validation</span> Use Case.
Therefore, the <span class="cour">Validation</span> Use Case should be included
in the <span class="cour">Cash Withdrawal (savings)</span>, <span
class="cour">Change PIN (Savings)</span>, and <span class="cour">Transaction
Summary (Savings)</span> Use Cases. In Visio, the
&#x003C;&#x003C;include&#x003E;&#x003E; relationship is termed as a
&#x003C;&#x003C;uses&#x003E;&#x003E; relationship. The symbol for
&#x003C;&#x003C;uses&#x003E;&#x003E; relationship in Visio is shown in the
following figure.</p>
<p class="center"><img src="images/4.24b.jpg" alt=""/></p>
<h4 class="note"><img src="images/note1.jpg" alt=""/></h4>
<p class="note1"><em>The Uses symbol appears as <img
src="images/symbol.jpg" alt=""/> in the UML Use Case stencil</em>.</p>
<p class="nonindent">The following figure shows the <span
class="cour">refined</span> use case diagram for the first iteration.</p>
<p class="center"><img src="images/4.25a.jpg" alt=""/></p>
<h5 class="section">Task 3: Identifying the System Boundary for the Second
Iteration</h5>
<p class="nonindent">In the first iteration, the Use Cases are implementing the
savings account function. In the second iteration, the Use Cases need to implement
the current account function. The basic function of the corresponding Use Cases in
both the iterations is the same. Notice that, the input data, such as the format for
the account number and the ATM card number, may be different. Therefore, the
functions of the Use Cases of the first iteration can be extended to obtain the Use
Cases of the second iteration. In Visio, the
&#x003C;&#x003C;extend&#x003E;&#x003E; relationship is termed as
&#x003C;&#x003C;extends&#x003E;&#x003E; relationship. The symbol for
&#x003C;&#x003C;extends&#x003E;&#x003E; relationship in Visio is shown in the
following figure.</p>

<p class="center"><img src="images/4.25b.jpg" alt=""/></p>


<h4 class="note"><img src="images/note1.jpg" alt=""/></h4>
<p class="note1"><em>The Extends symbol appears as <img
src="images/symbol.jpg" alt=""/> in the UML Use Case stencil</em>.</p>
<p class="nonindent">The following figure depicts the use case diagram that
represents the system boundary for the second iteration.</p>
<p class="center"><img src="images/4.26.jpg" alt=""/></p>
<h4 class="note"><img src="images/note1.jpg" alt=""/></h4>
<p class="note1"><em>When you refine the use cases, you actually reuse the
functions of the included and extended use cases. For example, the use
cases</em>, <span class="couri">Cash Withdrawal</span>, <span
class="couri">Change PIN</span>, <em>and</em> <span
class="couri">Transaction Summary</span>, <em>are reusing the functions of the
Validation Use Case. Therefore, in the Use Case diagram for the first iteration with
the refined Use Cases, the Validation Use Case is modeled as a reuse
element</em>.</p>
<h5 class="section">Task 4: Creating the Use Case Diagram</h5>
<p class="nonindent">To create the use case diagram, you need to perform the
following tasks:</p>
<ol class="arabic">
<li>Create the Use Case Diagram for First Iteration</li>
<li>Refine the Use Case Diagram for the First Iteration</li>
<li>Create the Use Case Diagram for the Second Iteration</li>
</ol>
<h5 class="section">Creating the Use Case Diagram for First Iteration</h5>
<p class="nonindent">To create the Use Case diagram for the first iteration, you
need to perform the following steps:</p>
<ol class="arabic">
<li>Select <strong>Start&#x2192;All Programs&#x2192;Microsoft
Office&#x2192;Microsoft Office Visio for Enterprise Architects</strong>.</li>
<li><p>Open the <strong>Bank_ATM</strong> Visio file in the <strong>Microsoft
Visio</strong> window. The <strong>Bank_ATM</strong> model appears in
Visio.</p>
<h4 class="note"><img src="images/note1.jpg" alt=""/></h4>

<p class="note1"><em>The Bank_ATM file was created in the activity of <a


class="hlink" href="09_ch03.htm">Chapter 3</a></em>.</p></li>
<li>Right-click the <strong>Top Package</strong> folder in the <strong>Model
Explorer</strong> window, and select <strong>New&#x2192;Package</strong>.
The <strong>UML Package Properties</strong> dialog box appears.</li>
<li><p>Type <strong>Iteration1</strong> in the <strong>Name</strong> text
box, as shown in the following figure.</p>
<p class="center"><img src="images/4.28.jpg" alt=""/></p>
</li>
<li>Click the <strong>OK</strong> button. The <strong>Iteration1</strong>
folder is added and appears in the tree structure of the <strong>Model
Explorer</strong> window.</li>
<li>Right-click the <strong>Iteration1</strong> in the <strong>Model
Explorer</strong> window, and select <strong>New&#x2192;Use Case
Diagram</strong>. The <strong>Use Case-1</strong> page with the blank
drawing page appears.</li>
<li><p>Draw the following use cases, actors, and their associations for the first
iteration:</p>
<p class="nonindent">The use cases for the first iteration are:</p>
<ul class="disc">
<li>Cash Withdrawal(Savings)</li>
<li>PIN change(Savings)</li>
<li>Transaction Summary(Savings)</li>
</ul>
<p class="nonindent">The Actors for the first iteration are:</p>
<ul class="disc">
<li>Bank Customer</li>
<li>Centralized Bank System</li>
</ul>
<p class="nonindent">After creating all the use cases, sctors and their association
for first iteration, the use case diagram should appear, as shown in the following
figure.</p>
<p class="center"><img src="images/4.29.jpg" alt=""/></p>
</li>

<li><p>Drag the <strong>System Boundary</strong> symbol (<img


src="images/system_boundary_symbol.jpg" alt=""/>) on the drawing page from the
<strong>UML Use Case (Metric)</strong> stencil, to create the System Boundary
for the first iteration. Ensure that Use Cases are placed inside the rectangle drawn
and Actors are outside the rectangle, as shown in the following figure.</p>
<p class="center"><img src="images/4.30.jpg" alt=""/></p>
<h4 class="note"><img src="images/note1.jpg" alt=""/></h4>
<p class="note1"><em>You can rename the system boundary by double-clicking
on it and then typing the new name</em>.</p></li>
</ol>
<h5 class="section">Refining the Use Case Diagram for the First Iteration</h5>
<p class="nonindent">To refine the use case diagram for the first iteration, you
need to perform the following steps:</p>
<ol class="arabic">
<li>Drag the <strong>Use Case</strong> symbol from the <strong>UML Use Case
(Metric)</strong> stencil inside the System Boundary on the drawing page and
rename it as <strong>Validation</strong>.</li>
<li>Connect the <strong>Validation</strong> Use Case with the
<strong>Centralized Bank System</strong> Actor using the
<strong>Communication</strong> symbol.</li>
<li><p>Drag the <strong>Uses</strong> symbol (<img src="images/symbol.jpg"
alt=""/>) on the drawing page from the <strong>UML Use Case</strong>
<strong>(Metric)</strong> stencil, to create a relationship between the Cash
Withdrawal (Savings) and Validation Use Cases, as shown in the following
figure.</p>
<p class="center"><img src="images/4.31a.jpg" alt=""/></p>
</li>
<li><p>Similarly, create the include relationships between the <span
class="cour">Change PIN (Savings)</span> and <span
class="cour">Validation</span> Use Cases and the <span
class="cour">Transaction summary (Savings)</span> and <span
class="cour">Validation Use</span> Cases, as shown in the following figure.</p>
<p class="center"><img src="images/4.31b.jpg" alt=""/></p>
</li>
</ol>
<h5 class="section">Creating the Use Case Diagram for the Second Iteration</h5>

<p class="nonindent">To create a use case diagram for the second iteration
perform the following steps:</p>
<ol class="arabic">
<li>Right-click the <strong>Top Package</strong> in the <strong>Model
Explorer</strong> window, and select <strong>New &#x2192;Package</strong>.
The <strong>UML Package Properties</strong> dialog box appears.</li>
<li>Type the name as <strong>Iteration2</strong> in the
<strong>Name</strong> text box and click the <strong>OK</strong> button.
<strong>Iteration2</strong> folder is added and appears in the tree structure of
the <strong>Model Explorer</strong> window.</li>
<li>Right-click the <strong>Iteration2</strong> in the <strong>Model
Explorer</strong> window, and select <strong>New&#x2192;Use Case
Diagram</strong>. The <strong>Use Case-1</strong> page with the blank
drawing page appears.</li>
<li><p>In addition to the Use Cases and Actors of the first iteration, draw the
following Use Cases for the second iteration:</p>
<p class="nonindent">The use cases for the second iteration are:</p>
<ul class="square">
<li>Cash Withdrawal(Current)</li>
<li>PIN change(Current)</li>
<li>Transaction Summary(Current)</li>
</ul>
<p class="nonindent">After creating all the use cases for second iteration, the use
case diagram should appear, as shown in the following figure.</p>
<p class="center"><img src="images/4.32.jpg" alt=""/></p>
</li>
<li><p>Drag the <strong>Extends</strong> symbol (<img
src="images/symbol.jpg" alt=""/>) on the drawing page from the <strong>UML Use
Case</strong> <strong>(Metric)</strong> stencil, to create a relationship between
Cash Withdrawal(Current) and Cash Withdrawal (Savings) Use Cases, as shown in
the following figure.</p>
<p class="center"><img src="images/4.33.jpg" alt=""/></p>
</li>
<li><p>Similarly, create the extend relationship between the Change PIN (Current)
and Change PIN (Savings) Use Cases and the Transaction summary (Current) and
Transaction summary (Savings) Use Cases, as shown in the following figure.</p>

<p class="center"><img src="images/4.34.jpg" alt=""/></p>


</li>
<li>Save and close the Bank _ATM model.</li>
<li>Close Microsoft Visio.</li>
</ol>
<p class="pagebreak">&#x00A0;</p>
<h1 class="chapter-head1" id="ch04s04">Summary</h1>
<p class="nonindent">In this chapter, you learned that:</p>
<ul class="square">
<li>The system boundary enables you to identify the iterations involved in SDLC
based on the priority of use cases.</li>
<li>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.</li>
<li>To refine the system definition, you refine the use cases identified for the
system.</li>
<li>The extend and include relationships are established among use cases to refine
the system definition.</li>
<li>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.</li>
<li>In UML, use case realizations are modeled using collaborations.</li>
<li>Collaboration is a collection of classes, interfaces, and subsystems that interact
to implement the functions of a use case.</li>
<li>Use cases are used to generate test cases.</li>
<li>Requirements are traced to ensure that the developed system fulfills the needs
of the customer adequately.</li>
<li>There are two approaches to trace requirements, backward and forward
requirements traceability.</li>
</ul>

<h1 class="chapter-head1" id="ch04s05">Exercises</h1>


<h4 class="section" id="ch04s05s01">Exercise 1</h4>

<p class="nonindent">Blue Valley Consulting Inc. has identified two modules that
satisfy the topmost priorities of the system for its successful implementation. The
refined details of each of these modules are given.</p>
<h5 class="section">Module 1: Maintain Tenant Details</h5>
<p class="nonindent">The system should maintain information about all
leaseholders for the purpose of billing and tracking. This module will enable an
Operations Manager to enter the details whenever there is a change required in the
tenant information or a new tenant is found for leasing purpose. For each tenant,
the system should record an identification number. The data in the identification
number can be one of the following:</p>
<ul class="square">
<li>First name, last name, and Social Security Number (SSN) of an individual</li>
<li>The company name and federal tax ID for an organization</li>
</ul>
<p class="nonindent">The system will match the identification information with the
existing information and display the list of tenants, if any tenants with these details
exist. The Operations Manager can then enter the data and save the changes. If the
changes are not saved, the system will revert to the previous record. The system
will prompt the Operations Manager to enter all the mandatory data and alert him if
any duplicate entry is found. The system will not allow anyone to enter data for any
leaseholder whose lease is still active. This will ensure that the original record of the
leaseholder is not modified. This module will also store the changes made to the
tenant&#x0027;s records along with date and time and the name of the Operations
Manager who modified the record. It will also enable the Property Manager to query
the database to view derived data on the recorded information.</p>
<h5 class="section">Module 2: Maintain Capital Details</h5>
<p class="nonindent">This module will enable the Property Manager to view and
maintain the records of capital committed to the property. The capital includes the
revenues generated by leasing. This module will also enable the Property Manger to
enter data for the new capital and for updating existing records.</p>
<p class="nonindent">A capital investment in the automated Real Estate
Management System will be uniquely identified by the combination of the property
name, location and category, and a system-assigned serial number. The system will
display a list of investments from which Property Managers or Operations Managers
can select or enter an investment name. This module will also store the capital
amount, capital commitment schedule, estimated returns, and the time and date
when the information is modified along with the name of the Property Manager who
modified the record.</p>
<p class="nonindent">A Property Manager can also optionally enter any contact
information of people involved in the investment other than Blue Valley Consulting

Inc. The system will validate if all the mandatory information is entered and prompt
the Property Manager to enter the missing mandatory information, if any.</p>
<p class="nonindent">Prepare the use case diagrams and identify the system
boundaries for the two modules of the Real Estate Management System of the Blue
Valley Consulting Inc.</p>
<p class="nonindent"><img src="images/hint.png" alt="" id="QN03130000102"
class="hint" /></p>
<h4 class="section" id="ch04s05s02">Exercise 2</h4>
<p class="nonindent">A library maintains the record for each copy of a book until
the book is returned. A library member can issue up to six books at a time. If the
requested book is already issued, members can reserve the books in their name. A
member can also make reservations for the books over the phone or the Internet.
For the automated library management system, the following use cases need to be
implemented:</p>
<ul class="square">
<li><strong>Issue books</strong>: Validates the library members and checks if
the requested books can be issued to them. If the number of copies in the stock
exceeds the number of reservation requests, the book is issued. Otherwise, the
member is informed that the book is not available.</li>
<li><strong>Extend Period</strong>: Extends the period for retaining the book.
The software system checks if there is a reservation on the book. If there is already
a reservation made for the book, the period for retaining the book is not
extended.</li>
</ul>
<p class="nonindent">Draw a use case diagram for the library management
system. The use case diagram should depict the relationships, if any, that exist
among use cases.</p>
<p class="nonindent"><img src="images/hint.png" alt="" id="QN03130000103"
class="hint" /></p>
<p class="pagebreak">&#x00A0;</p>
<h1 class="chapter-head1" id="ch04s06">Reference Links</h1>
<h4 class="section">Setting Boundaries and Project Scope</h4>
<table border="1" cellspacing="0" cellpadding="6" width="100%">
<tr valign="top">
<td align="left" style="width:30%"><strong><em>Reference Reading:
Books</em></strong></td>

<td align="left" style="width:70%"><strong><em>Reference Reading:


URLs</em></strong></td>
</tr>
<tr valign="top">
<td><em>Managing Software Requirements: A Use case Approach by Dean
Leffingwell Don Widrig Publisher: Addison Wesley</em></td>
<td><em><a class="hlink" href="http://www106.ibm.com/developerworks/rational/library/998.html">http://www106.ibm.com/developerworks/<br/>rational/library/998.html</a></em></td>
</tr>
</table>
<h4 class="section">Refining the System Definition</h4>
<table border="1" cellspacing="0" cellpadding="6" width="100%">
<tr valign="top">
<td align="left" style="width:30%"><strong><em>Reference Reading:
Books</em></strong></td>
<td align="left" style="width:70%"><strong><em>Reference Reading:
URLs</em></strong></td>
</tr>
<tr valign="top">
<td><em>Managing Software Requirements: A Use case Approach by Dean
Leffingwell Don Widrig Publisher: Addison Wesley</em></td>
<td><em><a class="hlink" href="http://www106.ibm.com/developerworks/rational/library/998.html">http://www106.ibm.com/developerworks/<br/>rational/library/998.html</a></em></td>
</tr>
</table>
</body>
</html>

Anda mungkin juga menyukai