8.building Analysis Model
8.building Analysis Model
8.building Analysis Model
Requirement Analysis
The model should focus on requirements that are visible within the problem or business domain. The level of abstraction should be relatively high. "Dont get bogged down in details" that try to explain how the system will work.
Each element of the analysis model should add to an overall understanding of software requirements and provide insight into the information domain, function, and behavior of the system.
Delay consideration of infrastructure and other non functional models until design
Minimize coupling throughout the system Be certain that the analysis model provides value to all stakeholders. Each constituency has its own use for the model. Keep the model as simple as it can be.
Data Objects
Data Objects: A data object is a representation of almost any composite infomation that must be understood by software. Composite information: Something that has a number of different properties or attributes. Ex: Dimension = width and height A data object can be an external entity (e.g., anything that produces or consumes information), a thing (eg., a report or a display), an occurrence (eg., a telephone call) or event (eg., an alarm), a role (e.g., salesperson), an organizational unit (eg., accounting department), a place (eg., a warehouse), or a structure (eg., a tile).
Data Objects
Data Attributes
It is properties of a data object (1) name an instance of the data object, (2) describe the instance (3) make reference to another instance in another table The set of attributes that is appropriate for a given data object is determined through an understanding of the problem context. The attributes for car might serve well for an application that would be used by a Department of Motor Vehicles, but these attributes would be useless for an automobile company that needs manufacturing control software.
Relationship
A person owns a car. A person is insured to drive a car.
Scenario-Based Modeling
SafeHome Application
Writing Usecases
Following functions (an abbreviated list) are performed by the homeowner actor:
Access camera surveillance via the Internet. Select camera to view. Request thumbnails from all cameras. Display camera views in a PC window. Control pan and zoom for a specific camera. Selectively record camera output. Replay camera output.
Writing Usecases
Informally conversation is continued Consider the function "access camera surveillance - display camera views (ACS DCV)."
Writing Usecases
lf Im at a remote location, I can use any PC with appropriate browser software to log on to the SafeHome Products Web site. I enter my user ID and two levels of passwords and, once i'm validated, I have access to all functionality for my installed SafeHome system. To access a specific camera view, I select "surveillance" from the major function buttons displayed. I then select "pick a camera," and the floor plan of the house is displayed. I then select the camera that I'm interested in. Alternatively, I can look at thumbnail snap-shots from all cameras simultaneously by selecting "all cameras" as my viewing choice. Once I choose a camera, I select "view," and a one-frame-persecond view appears in a viewing window that is identified by the camera ID. If I want to switch cameras, I select "pick a camera," and the original viewing window disappears. and the floor plan of the house is displayed again. I then select the camera that Im interested in. A new viewing window appears.
Use-Case: Access camera surveillancedisplay camera views (ACSDCV) Actor: homeowner I . The homeowner logs on to the SafeHome Products Web site. 2. The homeowner enters his or her user ID. 3. The homeowner enters two passwords (each at least eight characters in length). 4. The system displays all major function buttons. 5 The homeowner selects the "surveillance" from the major function buttons. 6. The homeowner selects "pick a camera." 7. The system displays the floor plan of the house. 8. The homeowner selects a camera icon from the floor plan. 9. The homeowner selects the "view" button. I0. The system displays a viewing window that is identified by the camera ID. 11. The system displays video output within the viewing window at one frame per second.
Writing Usecases
Each step in the primary scenario is evaluated by asking the following questions
Can the actor take some other action at this point? Is it possible that the actor will encounter some error condition at this point? if so, what might it be? Is it possible that the actor will encounter some other behavior at this point (e.g., behavior that is invoked by some event outside the actor's control)? if so, what might it be?
Writing Usecases
6. The homeowner selects "pick a camera 7. The system displays the floor plan of the house.
the actor may choose to view thumbnail snapshots of all cameras simultaneously.
Is it possible that the actor will encounter some error condition at this point?
A floor plan with camera icons may have never been configured.
Use-case Diagram
Swimlane diagram
Flow-Oriented Modeling
The Data Flow Diagrams (DFD) takes an input-process-output view of a system. Data objects are represented by labeled arrows and transformations are represented by circles (also called bubbles). The DFD is presented in a hierarchical fashion.
Guidelines
Depict the system as single bubble in level 0. Carefully note primary input and output. Refine by isolating candidate processes and their associated data objects and data stores. Label all elements with meaningful names. Maintain information conformity between levels. Refine one bubble at a time.
Grammatical Parse
Verbs are SafeHome processes; that is, they may ultimately be represented as bubbles in a subsequent DFD. Nouns are either external entities (boxes), data or control objects (arrows), or data stores (double lines).
Grammatical Parse
The SafeHome security function enables the homeowner to configure the security system when it is installed, monitors all sensors connected to the security system, and interacts with the homeowner through the Internet, a PC, or a control panel. During installation, the SafeHome PC is used to program and configure the system. Each sensor is assigned a number and type, a master password is programmed for arming and disarming the system, and telephone number(s) are input for dialing when a sensor event occurs.
When a sensor event is recognized, the software invokes an audible alarm attached to the system. After a delay time that is specified by the homeowner during system configuration activities, the software dials a telephone number of a monitoring service, provides information about the location, reporting the nature of the event that has been detected. The telephone number will be redialed every 20 seconds until a telephone connection is obtained.
The homeowner receives security information via a control panel, the PC, or a browser, collectively called an interface. The interface displays prompting messages and system status information on the control panel, the PC, or the browser window. Homeowner interaction takes the following form
Grammatical Parse
The SafeHome security function enables the homeowner to configure the security system when it is installed, monitors all sensors connected to the security system, and interacts with the homeowner through the Internet, a PC, or a control panel. During installation, the SafeHome PC is used to program and configure the system. Each sensor is assigned a number and type, a master password is programmed for arming and disarming the system, and telephone number(s) are input for dialing when a sensor event occurs. When a sensor event is recognized, the software invokes an audible alarm attached to the system. After a delay time that is specified by the homeowner during system configuration activities, the software dials a telephone number of a monitoring service, provides information about the location, reporting the nature of the event that has been detected. The telephone number will be redialed every 20 seconds until a telephone connection is obtained.
six selection characteristics that should be used as an analyst considers each potential class for inclusion in the analysis model
Retained information: The potential class will be useful during analysis only if information about it must be remembered so that the system can function. Needed services: The potential class must have a set of identifiable operations that can change the value of its attributes in some way. Multiple attributes: During requirement analysis, the focus should be on "major" information; a class with a single attribute may, in fact, be useful during design, but is probably better represented as an attribute of another class during the analysis activity.
six selection characteristics that should be used as an analyst considers each potential class for inclusion in the analysis model
Common attributes. A set of attributes can be defined for the potential class, and these attributes apply to all instances of the class. Common operations. A set of operations can be defined for the potential class, and these operations apply to all instances of the class Essential requirements: External entities that appear in the problem space and produce or consume information essential to the operation of any solution for the system will almost always be defined as classes in the requirements model.
Specifying Attributes
Study a use-case and select those "things" that reasonably "belong to the class. What data items (composite and/or elementary) fully define this class in the context of the problem at hand? System class
sensor information, alarm response information, activation/deactivation information, identification information, and so forth.
Defining Operations
Categories
Operations that manipulate data in some Operations that perform a computation Operations that inquire about the state of an object Operations that monitor an object for the occurrence of a controlling event.
Defining Operations
Class-ResponsibilityColluborctor (CRC) Modeling A CRC model is really a collection of standard index cards that
represent classes. The cards are divided into three sections. Along the top of the card you write the name of the class. In the body of the card you list the class responsibilities on the left and the collaborators on the right.
Entity (model or business) classes are extracted directly from the statement of the problem (eg., FloorPlan and Sensor). Persist through out the duration of application Boundary classes are used to create the interface (eg., interactive screen or printed reports) that the user sees and interacts with as the software is used. Controller classes manage a "unit of work" from start to finish. That is, controller classes can be designed to manage
1. 2. 3. 4. the creation or update of entity objects the instantiation of boundary objects as they obtain information from entity objects complex communication between sets of objects validation of data communicated between objects or between the user and the application.
System intelligence should be distributed across classes to best address the needs of the problem. Each responsibility should be stated as generally as possible. Information and the behaviour related to it should reside within the same class. Information about one thing should be localized with a single class, not distributed across multiple classes. Responsibilities should be shared among related classes, when appropriate.
Collaborations
Collaborations
Three different generic relationships between classes
All classes that are part of an aggregate class are connected to the aggregate class via an is-part-of relationship. When one class must acquire information from another class, the has-knowledge-of relationship is established. The depends-upon relationship implies that two classes have a dependency that is not achieved by hasknowledge-of or is-part-of
In many instances, two analysis classes are related to one another in some fashion, much like two data objects may be related to one another. In UML these relationships are called associations.
Analysis Packages
An important part of analysis modeling is categorization. That is, various elements of the analysis model (e.g., use-cases, analysis classes) are categorized in a manner that packages them as a grouping-called an analysis package-that is given a representative name.
Behavioral Modeling
Behavioral Modeling
The behavioral model indicates how software will respond to extemal events or stimuli. To create the model, the analyst must perfom the following steps:
Evaluate all use-cases to fully understand the sequence of interaction within the system. Identify events that drive the interaction sequence and understand how these events relate to specific classes. Create a sequence for each use-case. Build a state diagram for the system. Review the behavioral model to verify accuracy and consistency.
Identifying Events
A use-case is examined for points of information exchange. The homeowner uses the keypad to key in a four-digit password. The password is compared with the valid password stored in the system. If the password in incorrect, the control panel will beep once and reset itself for additional input. If the password is correct, the control panel awaits further action.
State Diagram
Sequence Diagram