Professional Documents
Culture Documents
5 Object Design
5 Object Design
5 Object Design
PPT 5
OBJECT DESIGN
OBJECT DESIGN
state.
Event driven- Direct implementation of a state machine
mechanism.
Concurrent tasks-Control as concurrent tasks.
5. Adjust class structure to increase
inheritance
• The designer should rearrange and adjust classes and
operations to increase inheritance
- some operations in different classes have slight
changes than other
- slight modifications in the definition of operations or
classes, can be made as inherited operations
- Eg , some operations have lesser arguments, attributes
have different names
• The designer should abstract common
behaviour out of group of classes
- Re-examine object model for commonality between
classes
- If any common behavior superclass can be created
- Adv- sharing, reuse, extensibility
• The designer should use delegation to share
implementation
- Sharing behavior- generalization relationship
6. Design of association
• Provide access path between objects
• Analyze the way associations are used
• Either choose a global strategy or particular
technique for each association implementation
• Analyzing association traversal
• Associations may be either one-way
associations or two –way associations.
- If one direction , implementation is simple
• One way association- only related in one
direction
Person works for a company
Employer employee
• Two way association – traversed in both
direction
-
7. Determine Object representation
• Designer must choose when to use primitive
types in representing objects and when to
combine groups of related objects.
• Classes can be defined in terms of other classes
• Finally everything must be implemented in terms
of primitive data types such as integers, strings
etc..
• Choose whether to combine groups of related
objects
8. Packing classes and associations into
modules
• Programs are made of discrete physical units
that can be edited, compiled, imported or
manipulated
• Object oriented languages have various degrees
of packaging
• In large project, careful partitioning of an
implementation into packages is important to
permit different persons to cooperatively work
on a program
Packaging involves the following issues:
• Hiding internal information from outside view.
• Coherence of entities.
• Constructing physical modules
9. Documenting design decisions
• Design document should be an extension of the
Requirement Analysis Document