Chapter - Four

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

CHAPTER -FOUR OUTLINE

1 2

Introduction
An overview of Analysis
Analysis concepts and activities
Identifying Entity objects, Boundary objects, Control
Object oriented system analysis objects
Association Multiplicity, Qualified Associations,
Generalization.
Modeling interaction between objects
Identifying Associations and Attributes

Object-Oriented System Analysis Object-Oriented System Analysis

Introduction Cont…
3 4

 Requirement Analysis: which results into an analysis model that the  They differ only in the language and notation they use.

developers can unambiguously interpret the requirement.  The system specification is written in natural language, where as the analysis

model is usually expressed in a formal or semiformal notation.


 The client, the developers, and the users identify a problem area and
 The system specification supports the communication with the client and users.
define a system that addresses the problem.
 The analysis model supports the communication among developers.
 Such a definition is called a system specification and serves as a
 Requirements elicitation and analysis focus only on the user’s view of the
contract between the client and the developers.
system:-
 The system specification is structured and formalized during analysis
➢ The system functionality.
to produce an analysis model.
➢ The interaction between the user and the system.
 Both system specification and analysis model represent the same
➢ The errors that the system can detect and handle.
information.
Object-Oriented System Analysis Object-Oriented System Analysis
An Overview of Analysis Cont…
5 6
 Analysis focuses on producing a model of the system, called the  The analysis model is composed of three individual
analysis model, which is correct, complete, and consistent.
models: -
The functional model- represented by use cases and
scenarios.
The analysis object model- represented by class and
object diagrams.
The dynamic model- represented by state chart,
activity diagram and sequence diagrams.

Products of requirements elicitation and analysis (UML activity diagram).

Object-Oriented System Analysis Object-Oriented System Analysis

Entity, Boundary, and Control Objects Cont…


7 8

The analysis object model - consists of entity, Example :Lets take watch:-
boundary, and control objects. Year,
Month, Day are entity objects;
Entity objects: represent the persistent information Button and LCD Display are boundary objects;

tracked (follow) by the system. Change Date is a control object that represents
the activity of changing the date by pressing
Boundary objects: represent the interactions
combinations of buttons.
between the actors and the system.
Analysis Activities: From Use Cases to Objects.
Control objects: represent the tasks that are
 In this section, we describe the activities that
performed by the user and supported by the system. transform the use cases and scenarios produced
during requirements elicitation into an analysis
model.
Object-Oriented System Analysis Object-Oriented System Analysis
Cont… Cont…
9 10

 Identifying Entity Objects


 Analysis activities include:-
 Participating objects form the basis of the analysis
• Identifying entity ,boundary and control objects model.
• Mapping use cases to objects  Participating objects are found by examining each use

• Identifying associations among objects case and identifying candidate objects.


 Example: lets see the ReportEmergency use case
• Identifying object attributes
 Use case name : ReportEmergency
• Modelling object’s behaviour with state charts  Description: Activate incident management system

• Modelling generalization relationships whenever incident is occurred.


 Participating actors: FieldOfficer, Dispatcher

Object-Oriented System Analysis Object-Oriented System Analysis

Cont… Cont…
11 12
 Precondition: The FieldOfficer activates the “ReportEmergency”  Therefor, by examining each use case it is possible to identify
function of his/her terminal.
Participating objects.
 Post-condition: The FieldOfficer receives the acknowledgment and the
selected response.  Some of the entity objects for ReportEmergeny use case are:-
 Basic course of action:  Dispatcher :Police officer who manages Incidents.
 The FieldOfficer fills the form by selecting the emergency level, type,
❖ A Dispatcher opens documents, and closes Incidents in response to
location, and brief description of the situation.
 FieldOfficer also describes possible responses to the emergency
EmergencyReports.
situation.  EmergencyReport: Initial report about an Incident from a
 Once the form is completed, the FieldOfficer submits the form, at FieldOfficer to a Dispatcher.
which point the Dispatcher is notified.
❖ An EmergencyReport usually triggers the creation of an Incident by
 The Dispatcher reviews the submitted information and creates an
Incident in the database by invoking the OpenIncident use case. the Dispatcher.
 The Dispatcher selects a response and acknowledges the emergency  FieldOfficer: Police or fire officer on duty.
report.  A FieldOfficer can be allocated to, at most, one Incident at a time.
 The FieldOfficer receives acknowledgment.
 Incident -- Situation requiring attention from a FieldOfficer.
 The Usecase ends.
Object-Oriented System Analysis Object-Oriented System Analysis
Cont… Cont…
13 14

Identifying Boundary Objects  These are some of boundary objects by examining the
 Boundary objects represent the system interface with the ReportEmergency use case:-
actors. AcknowledgmentNotice: Notice used for displaying

 The boundary object collects the information from the


the Dispatcher’s acknowledgment to the FieldOfficer.
actor and translates it into an interface that can be used DispatcherStation : Computer used by the
by the entity objects and also by the control objects. Dispatcher.
 Identify forms and windows that helps the users to enter ReportEmergencyForm: A form used for the input
data into the system (e.g.,EmergencyReportForm). of the ReportEmergency information.
 Identify notices and messages that the system uses to FieldOfficerStation : Mobile computer used by the
respond to the user (e.g., AcknowledgmentNotice). FieldOfficer.

Object-Oriented System Analysis Object-Oriented System Analysis

Cont… Cont…
15 16

 Identifying Control Objects  ReportEmergencyControl: Manages the report emergency


 Control objects are responsible for coordinating boundary and reporting function on the FieldOfficerStation.
entity objects.
 This object is created when the FieldOfficer selects the
 It is responsible for collecting information from the boundary
objects and dispatching it to entity objects. “Report Emergency” button.
 The control objects describe the behaviour associated with:  It then creates an EmergencyReportForm and presents it to

❖The sequencing of forms the FieldOfficer.


❖Dispatching information in a distributed system, etc.  ManageEmergencyControl: Manages the report emergency
reporting function on the DispatcherStation.
 Example: the control flow of the ReportEmergency use case  This object is created when an EmergencyReport is received.
with a control object for each actor;  It then creates an IncidentForm and displays it to the
ReportEmergencyControl: for the FieldOfficer and Dispatcher.
ManageEmergencyControl: for the Dispatcher
Object-Oriented System Analysis Object-Oriented System Analysis
Modelling Interactions Between Objects Cont…
17 18

 Sequence Diagrams  Guidelines for drawing sequence diagrams:-


 A sequence diagram allow developers to represent interactions  The first column should correspond to the actor who initiated
among objects over time. the use case.
 It shows how the behaviour of a use case (or scenario) is  The second column should be a boundary object (that the
distributed among its participating objects. actor used to initiate the use case).
 It model the sequence of interactions among objects needed to  The third column should be the control object that manages
realize the use case. the rest of the use case.
 The columns of a sequence diagram represent the objects that
 Control objects are created by boundary objects initiating
participate in the use case.
use cases.
 The leftmost column is the actor who initiates the use case.
 Entity objects are accessed by control and boundary objects.
 Horizontal arrows across columns represent messages, or stimuli,
which are sent from one object to the other.  Entity objects never access boundary or control objects, this
 Time proceeds vertically from top to bottom. makes it easier to share entity objects across use cases.

Object-Oriented System Analysis Object-Oriented System Analysis

Cont… Cont…
19 20

 By constructing sequence diagrams


❖ Example of sequence diagram

 We can model the order of the interaction among the objects.

 We also distribute the behaviour of the use case.

 Assign to each object responsibilities in the form of a set of


operations.

 Sequence diagrams are used to help identify:-

 New participating objects and

 Missing behaviour.

Object-Oriented System Analysis Object-Oriented System Analysis


Cont… Cont…
21 22

 Identifying Associations ▪ Associations have several properties:-

▪ Sequence diagrams:-allow developers to represent interactions  A name, to describe the association between the two classes (e.g., Writes)

among objects over time.  A role at each end, identifying the function of each class with respect to the
associations (e.g., author is the role played by FieldOfficer in the Writes
▪ Class diagrams:- allow developers to describe the connectivity of
association).
objects.
 A multiplicity at each end, identifying the possible number of instances
▪ In this section, we discuss the use of class diagrams for
e.g., ..* indicates a FieldOfficer may write zero or more EmergencyReports.
representing object attributes and associations among objects. - 1 indicates that each EmergencyReport has exactly one FieldOfficer as
▪ An association shows a relationship between two or more classes. author.

Object-Oriented System Analysis Object-Oriented System Analysis

Cont… Cont…
23 24

❖ For example, each FieldOfficer has a social security number,

Instead, FieldOfficers are identified by badge number.

▪Identifying Attributes
▪Attributes are properties of individual objects.
▪When identifying properties of objects, only the attributes
relevant to the system should be considered. Attributes of the EmergencyReport class.
Object-Oriented System Analysis Object-Oriented System Analysis
Modelling the Behaviour of Individual Objects Cont…
25 26

 Sequence diagrams are used to distribute behaviour across objects and to  The following Figure displays a state chart for the Incident
identify operations.
class.

• It represent the behaviour of the system from the perspective of a


single use case.
 State chart diagrams: represent behaviour from the perspective of a single
object.
 Viewing behaviour from the perspective of each object enables the
developer:-
• To identify missing use cases  The examination of this state chart may help the developer
check if there are use cases for documenting, closing, and
• To build a more-formal description of the behaviour of the archiving Incidents.
object.
Object-Oriented System Analysis Object-Oriented System Analysis

Modelling Generalization Relationships Between Objects Cont…


27 28

 Generalization is used to eliminate redundancy from the analysis model.

 If two or more classes share attributes or behaviour, the similarities are


consolidated into a superclass.
 For example, Dispatchers and FieldOfficers both have a
badgeNumber attribute that serves to identify them within a city.
 FieldOfficers and Dispatchers are both PoliceOfficers who are
assigned different functions.
 To model explicitly this similarity, we introduce an abstract
PoliceOfficer class from which the FieldOfficer and Dispatcher
An example of inheritance relationship (UML class diagram).
classes inherit.
Object-Oriented System Analysis Object-Oriented System Analysis
Cont… Cont…
29 30

End
Analysis activities (UML activities diagram).
Object-Oriented System Analysis Object-Oriented System Analysis

You might also like