Chapter 04
Chapter 04
Overview
Scenario-based Modeling
Class-based Modeling
Flow-oriented Modeling
Behavior Modeling
Primary scenarios: are use cases that don’t consider any alternative
interactions
UML, short for Unified Modeling Language, is a standardized modeling language consisting
of an integrated set of diagrams, developed to help system and software developers for
specifying, visualizing, constructing, and documenting the artifacts of software systems, as
well as for business modeling and other non-software systems.
The primary goals in the design of the UML summarize by Page-Jones in Fundamental
Object-Oriented Design in UML as follows:
Provide users with a ready-to-use, expressive visual modeling language so they can develop
and exchange meaningful models.
Provide extensibility and specialization mechanisms to extend the core concepts.
Be independent of particular programming languages and development processes.
Provide a formal basis for understanding the modeling language.
Encourage the growth of the OO tools market.
Support higher-level development concepts such as collaborations, frameworks, patterns
and components.
Integrate best practices.
A UML activity diagram represents the actions and decisions that occur as
some function is performed.
A UML swimlane diagram represents the flow of actions and decisions and
indicates which actors perform each.
The UML swimlane diagram is a useful variation of the activity diagram and
allows you to represent the flow of activities described by the use case and
at the same time indicate which actor (if there are multiple actors involved
in a specific use case) or analysis class (discussed later in this chapter) has
responsibility for the action described by an activity rectangle.
Level 1 - model all data objects (entities) and their “connections” to one
another
Level 2 - model all entities and relationships
Level 3 - model all entities, relationships, and the attributes that provide
further depth
Represents:
The objects of the system
The operations (also called methods or services) applied to the objects
Relationships (some hierarchical) between the objects
The collaborations occurring between the classes
The elements of a class-based model include:
Classes and objects
Attributes
Operations
Class responsibility-collaborator (CRC) models
Collaboration diagrams
Packages.
1. Retained information. The potential class will be useful during analysis only if information
about it must be remembered so that the system can function.
2. Needed services. The potential class must have a set of identifiable operations that can
change the value of its attributes in some way.
3. 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.
4. Common attributes. A set of attributes can be defined for the potential class and these
attributes apply to all instances of the class.
5. Common operations. A set of operations can be defined for the potential class and these
operations apply to all instances of the class.
6. 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.
Attributes describe a class that has been selected for inclusion in the
analysis model.
build two different classes for professional baseball players
For Playing Statistics software: name, position, batting average, fielding percentage,
years played, and games played might be relevant
For Pension Fund software: average salary, credit toward full vesting, pension plan
options chosen, mailing address, and the like.
Attributes are the set of data objects that fully define the class within the
context of the problem.
Entity classes, also called model or business classes, are extracted directly from
the statement of the problem (e.g., FloorPlan and Sensor).
Boundary classes are used to create the interface (e.g., interactive screen or
printed reports) that the user sees and interacts with as the software is used.
Controller classes manage a “unit of work” [UML03] from start to finish. That is,
controller classes can be designed to manage
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.
Two analysis classes are often related to one another in some fashion
In UML these relationships are called associations
Associations can be refined by indicating multiplicity (the term cardinality is used
in data modeling
In many instances, a client-server relationship exists between two analysis
classes.
In such cases, a client-class depends on the server-class in some way and a
dependency relationship is established
The data flow diagram enables you to develop models of the information
domain and functional domain.
As the DFD is refined into greater levels of detail, you perform an implicit
functional decomposition of the system.
Guidelines:
1. the level 0 data flow diagram should depict the software/system as a single bubble.
2. primary input and output should be carefully noted.
3. refinement should begin by isolating candidate processes, data objects, and data
stores to be represented at the next level.
4. all arrows and bubbles should be labeled with meaningful names.
5. information flow continuity must be maintained from level to level..
6. one bubble at a time should be refined.
review user scenarios and/or the data model to isolate data objects and
use a grammatical parse to determine “operations”
determine external entities (producers and consumers of data)
create a level 0 DFD