OOSAD Chapter 9

Chapter 9 (part I):
Analysis Classes
(Adapted)
Object-Oriented Systems Analysis and
Design
Joey F. George, Dinesh Batra,
Joseph S. Valacich, Jeffrey A. Hoffer
9-1
Outline

System Logic
 Activity Diagram
 Decision Tables
 Business Rules
9-2
System Logic
•
Aspect of system’s behavior showing flow
of control among processes (activities).
•
Depicted in Activity Diagram, Decision
Tables, etc.
•
Different types of logic.
9-3
Activity Diagram

A diagram that emphasizes the flow of
control over processes or object activities
by using decision points and other flowchart
symbols.

Similar to the traditional program flowchart
9-4
Elements of Activity Diagrams

Activity – a behavior that an object carries out while in a particular
state; an oval shape.

Transition, Flow of control – a movement from one activity or state to
another; an arrow shape.

Decision point – condition(s) that shift control to different paths of
activities; a diamond shape.


Merge point – point that merges different paths after decision point;
a diamond shape.

Synchronization bar – bars denoting parallel paths of activities
9-5
of Online Store Sales System
Activity diagram with a
decision point
One of the two possible paths
will be selected for each
execution
9-6
in a Sales Management
System
Activity diagram with
synchronization bars
Top synchronization bar
is a fork.
Bottom synchronization
bar is a join.
9-7
Types of Logic
1) Sequential logic – processes run one after another
Create Order
Place
Order
Check Order
Status
Process Invoice
to Order
Activity Diagram for Purchasing Management System
2) Parallel logic – processes run at the same time
(Fig. 9.12); uses synchronizations bars.
9-8
3) Conditional logic – process runs if
certain conditions met.
Also called IF-THEN logic.
- Example: See Fig. 9-11.
- Example of counter-based
decision point:
Yes
Register Student
Courses
<= 5
No
Print
“Limit Reached”
Decision point in
Course Registration System allowing 5 courses/semester
9-9
4) Case logic – expanded version of IF-THEN
logic.
Activity Diagram of Create Order Process in Purchasing Management System
Conditions At min. level
Enter Create
Order Module
Product in
Inventory
?
At zero
level
Never procured
Create
Standing
Order
Merge
point
Create
Special
Order
Create
New
Order
• Resembles decision tree.
• Used also for logic of user interface.
9-10
5) Loop logic – circular flow (repetition, iteration); variant of IF-THEN
logic. Two forms:
(a) test a condition, then run a process
(while a condition is true, do process)
Y
Hungry
?
Also, see Fig. 9-11
Eat
N
(b) run a process, then test a condition
(do process, until a condition is false)
Hungry
?
Eat
Y
N
Or:
1. Get Login Data
2. Decision: Data Correct?
3. If No at 2, go to 1
• Used in lower level diagrams; communicates well to programmers.
• Activity diagrams may use other symbols for repetition.
9-11
Decision Tables
Legend: S=Salaried Employee, K=Hourly Employee; X means that a particular action is chosen.
9-12
Legend: S=Salaried Employee, K=Hourly Employee; X means that a particular action is chosen.
9-13
Business Rules

A directive that is intended to influence or
guide business behavior.

In information systems, business rules are
implemented as inferences (decisions),
constraints, and program code.
9-14
Types of Business Rules

Inferences – Decision points (in activity
diagrams; in decision tables that result in attribute
values and actions being set).

Constraints – Restrictions, mainly in the form of
multiplicities (data modeling, implemented as
metadata statements), permissible data (type,
range), and validation rules (in user interface).

Program Code – Calculations and small programs
(triggers) that produce some value.
9-15