Page 138 - DCAP308_OBJECT_ORIENTED_ANALYSIS_AND_DESIGN
P. 138
Object Oriented Analysis and Design
Notes
!
Caution Although derived association do not add information, they are useful in real
world and in design.
11.1.6 Finding Attributes
Attributes are data properties of individual objects. Attribute values should not be a class.
Only consider attributes directly relevant to application. Be sure to give each attribute a
meaningful name.
Omit derived attribute.
11.1.7 Keeping Right Attributes
Objects: If independent existence of element is important than value consider it as object.
Example: Boss refers to a class and salary is an attribute
Qualifier: If value of attribute depends on particular context consider it as qualifier.
Example: Employee no is qualifier
Names: Name is an attribute when it does not depend on context & it is not unique.
Example: Dept. name, person name
Identifiers: Do not include attribute whose only purpose is to identify an object.
Example: Transaction ID is not attribute
Internal Value:
If attribute describes internal state of object then eliminate it.
Omit minor attribute that are unlikely to affect most operation
11.1.8 Refining with Inheritance
This step is to organize classes by using inheritance to share common structure
Inheritance can be discovered by searching classes by similar attributes, associations and
operations.
Organize classes by using inheritance to share common structure
Inheritance can be added in two directions
By generalizing classes into super class
By specializing existing classes into multiple subclasses
132 LOVELY PROFESSIONAL UNIVERSITY