Page 140 - DCAP308_OBJECT_ORIENTED_ANALYSIS_AND_DESIGN
P. 140
Object Oriented Analysis and Design
Notes 5. If value of attribute depends on particular context, it is considered as ........................
6. ........................ is an attribute when it does not depend on context & it is not unique.
7. ........................ can be added by generalizing existing classes into a superclass or by
specializing a class into subclasses.
8. ........................ is done by generalizing common aspect of existing classes into superclasses.
9. ........................ is done by refining existing classes into specialized subclasses.
11.2 Domain State Model
Objects passes through distinct states during their lifetime.
Describes various states of objects,
Properties & constrains of object in various state
Events that take object from one state to Another
Steps for constructing a domain state model:
Identify class with state
Find state
Find event
Build state diagram
11.2.1 Identify Domain Class with State
Check list of domain classes for those that have distinct life cycle.
Identify significant states in life cycle of object
Being written Under consideration Accepted or rejected
Example: ATM:-Account class has lifecycle & ATM depends on state of an account
11.2.2 Find State
List states for each class
Give each state a meaningful name
State should be based on qualitative difference in behavior, attributes & association
Example: In figure below, we have shown the different states.
Normal (ready for normal access)
Closed (closed by customer but still on file in bank records)
Overdrawn (customer withdrawals exceed the balance in account)
Suspended (access to account is blocked for some reason)
134 LOVELY PROFESSIONAL UNIVERSITY