CIS 375 SOFTWARE ENGINEERING

University Of Michigan-Dearborn

Dr. Bruce Maxim, Instructor

Object Oriented Analysis

Object Oriented Design

Object.

(Class = type vs. Instance = var)

Encapsulation

(Data & methods)

Message passing.

(Method call & return)

Inheritance.

(Polymorphism & reuse)

Dynamic bindings.

(Types & methods)

Identify the problem objects

(classes) = nouns (not procedure names)

Example:

    1. External entities (people & devices).
    2. Things in problem domain (reports, displays, signals).
    3. Occurrences or events (completion of some task).
    4. Roles (manager, engineer, sales person).
    5. Organizational units (division, groups, department).
    6. Structures (sensors, vehicles, computers).

Criteria:

(Object or not)

    1. Does object inf. need to be retained?
    2. Does object have a set of needed services?
    3. (Can change it’s attributes)
    4. Does the object have major attributes?
    5. (Trivial objects should not be built)
    6. Identify common attributes for all object instances.
    7. Identify common operations for all object instances.
    8. (If nothing to share, why make it an object?)
    9. External entities which produce or consume must have defined classes.

Specifying Attributes:

(define in terms of atomic objects)

Specifying Operations:

    1. Include anything needed to manipulate data elements.
    2. Communication among objects.

 

Object Specification:

    1. Object name.
    2. Attribute description:
    1. Attribute name.
    2. Attribute content.
    3. Attribute data type/structure.
    1. External input to object.
    2. External output from object.
    3. Operation description:
    1. Operation name.
    2. Operation interface description.
    3. Operation processing description.
    4. Performance issues.
    5. Restriction and limitations.
    1. Instance connections:
    2. (0:1, 1:1, 0:many, 1:many)

    3. Message connections.

Object Oriented Design:

Object

    1. Private data & related operations.
    2. Shared part (interface).

Advantages:

    1. Decomposability (problem -> sub-problem).
    2. Composability (reusability of pieces).
    3. Understandability (with respect to independence).
    4. Continuity (easy to change).
    5. Protection (encapsulation).

Design Principles For Modularity:

    1. Linguistic modular units.
    2. (ADT’s should be supported)

    3. Few interfaces.
    4. Small interfaces (weak coupling).
    5. Explicit interfaces (parameter – not common coupling).
    6. Information hiding.