Unit 4

Object Oriented design process
      and design axioms
Object Oriented design process
                                     Access layer

                                     •Create mirror class
                                     •Identify access layer class
                                     relationship
                                     •Simplify class and
                                     relationship
                                              •Remove redundant
                                              class
                                              •Method class
   Design       Apply design                                     User
  calsses,         axioms      Design view /                 satisfaction
 methods,        Refine UML    access layers                 and usability
 attributes,   classDiagrams   and prototype                test based on
associations                                                  use cases
Object Oriented design axioms
• Axioms
  – Hypothesized from observation
  – Common truth
  – Always valid
  – No need to prove and derive
• Theorem
  – It can be proven from axioms
• Corollary
  – Follows from axioms and theorems
Axioms for OOAD
• Axiom1
   – Maintain the independence of component
       • While going from requirements and use case to system component, each
         component must satisfy requirements without affecting other requirements
       • Ex:Fridge door
            – Req
                » Access to food
                » Minimal energy loss
            – Vertical door
                » Access to food
                » No Minimal energy loss
            – Horizontal door
                » Provides both requiremnt

• Axiom 2
   – Minimize the information content of the design
corollary
• Called design rules
• Derived from axioms
corollaries
• Corollary 1
   – Uncoupled design with less information content
• Corollary 2
   – Single purpose
• Corollary 3
   – Large number of single classes
• Corollary 4
   – Strong mapping
• Corollary 5
   – standardization
• Corollary 6
   – Design with inheritance
Corollary 4

                                     Corollary 1


               Axiom1                Corollary 2


               Axiom2                Corollary 3




Corollary 5                 Corollary 6
Corollary 1
• Uncoupled design with less information content
   – Goal
      • Maximize cohesiveness
      • Improve coupling
      • Less information transaction among objects
   – Coupling
      • Deals interaction among objects
   – Types of coupling
      • Interaction coupling
            – Involves the amount and complexity of messages bw components
            – Tightly coupled objects leads to change in one object reflects changes
              in others
      • Inheritance coupling
            – Inheritance is form of coupling bw super and sub class
            – High Inheritance coupling is desirable
   – Cohesion
      • Deals interaction within a single objects
      • Reflects single purpose ness
      • High cohesiveness can lower coupling
Corollary 2
• Single purpose
  – Each class must have a purpose
  – Clearly defined and necessary in the context
    of achieving system’s goals
Corollary 3
• Large number of single classes, reusability
  – The less specialized the classes are, the
    more likely future problems can be solved by
    a recombination of existing classes
  – Smaller classes
     • less specialized
     • Chance of reusing
  – Large and complex classes
     • More specialized
     • Less chances of reusing
Corollary 4
• Strong mapping
  – As the model progress from analysis to
    implementation, more detail is added, but it
    remains the same
  – Strong mapping links classes identified
    during analysis and design phase
Corollary 5
• Standardization
  – Documentation
    • Knowledge of existing classes helps to identify new
      classes
Corollary 6
• Design with inheritance

Unit 4

  • 1.
    Unit 4 Object Orienteddesign process and design axioms
  • 2.
    Object Oriented designprocess Access layer •Create mirror class •Identify access layer class relationship •Simplify class and relationship •Remove redundant class •Method class Design Apply design User calsses, axioms Design view / satisfaction methods, Refine UML access layers and usability attributes, classDiagrams and prototype test based on associations use cases
  • 3.
    Object Oriented designaxioms • Axioms – Hypothesized from observation – Common truth – Always valid – No need to prove and derive • Theorem – It can be proven from axioms • Corollary – Follows from axioms and theorems
  • 4.
    Axioms for OOAD •Axiom1 – Maintain the independence of component • While going from requirements and use case to system component, each component must satisfy requirements without affecting other requirements • Ex:Fridge door – Req » Access to food » Minimal energy loss – Vertical door » Access to food » No Minimal energy loss – Horizontal door » Provides both requiremnt • Axiom 2 – Minimize the information content of the design
  • 5.
    corollary • Called designrules • Derived from axioms
  • 6.
    corollaries • Corollary 1 – Uncoupled design with less information content • Corollary 2 – Single purpose • Corollary 3 – Large number of single classes • Corollary 4 – Strong mapping • Corollary 5 – standardization • Corollary 6 – Design with inheritance
  • 7.
    Corollary 4 Corollary 1 Axiom1 Corollary 2 Axiom2 Corollary 3 Corollary 5 Corollary 6
  • 8.
    Corollary 1 • Uncoupleddesign with less information content – Goal • Maximize cohesiveness • Improve coupling • Less information transaction among objects – Coupling • Deals interaction among objects – Types of coupling • Interaction coupling – Involves the amount and complexity of messages bw components – Tightly coupled objects leads to change in one object reflects changes in others • Inheritance coupling – Inheritance is form of coupling bw super and sub class – High Inheritance coupling is desirable – Cohesion • Deals interaction within a single objects • Reflects single purpose ness • High cohesiveness can lower coupling
  • 9.
    Corollary 2 • Singlepurpose – Each class must have a purpose – Clearly defined and necessary in the context of achieving system’s goals
  • 10.
    Corollary 3 • Largenumber of single classes, reusability – The less specialized the classes are, the more likely future problems can be solved by a recombination of existing classes – Smaller classes • less specialized • Chance of reusing – Large and complex classes • More specialized • Less chances of reusing
  • 11.
    Corollary 4 • Strongmapping – As the model progress from analysis to implementation, more detail is added, but it remains the same – Strong mapping links classes identified during analysis and design phase
  • 12.
    Corollary 5 • Standardization – Documentation • Knowledge of existing classes helps to identify new classes
  • 13.
    Corollary 6 • Designwith inheritance