$30 off During Our Annual Pro Sale. View Details »

CSE564 Lecture 26

CSE564 Lecture 26

Software Design
Final Review
(202211)

Javier Gonzalez-Sanchez
PRO

September 26, 2020
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs
    CSE 564
    Software Design
    Lecture 25: Final Review
    Dr. Javier Gonzalez-Sanchez
    [email protected]
    javiergs.engineering.asu.edu | javiergs.com
    PERALTA 230U
    Office Hours: By appointment

    View Slide

  2. jgs
    Structural Complexity
    Instability, Abstractness, and Distance

    View Slide

  3. jgs
    564 00000100
    Example

    View Slide

  4. jgs
    564 00000100
    • Instability = Cout
    (Cin + Cout)
    Stable Abstraction Principle (SAP)

    View Slide

  5. jgs
    564 00000100
    Distance
    § Distance: how far a package is away from
    the Main Sequence
    § D = A + I – 1
    § Values -1 to 1
    § Absolute Distance |D|

    View Slide

  6. jgs
    564 00000100
    Example
    ITeamA
    = 6 / 0 + 6 = 1
    ATeamA
    = 0
    DTeamA
    = 0 + 1 – 1 = 0
    IJlabel
    = 0 / 4 + 0 = 0
    AJlabel
    = 0
    DJlabel
    = 0 + 0 – 1 = -1
    |Djlabel
    | = 1
    Pain Zone (just an example!)

    View Slide

  7. jgs
    564 00000100
    Stable Dependency Principle (SDP)
    § Every dependency between modules should terminate on a module whose
    Instability is less than or equal to the depending
    module's Instability.
    § Every dependency between modules should terminate on a module whose
    Abstractness is greater than or equal to the depending
    module's Abstractness.

    View Slide

  8. jgs
    564 00000100
    Structural Metrics
    Instability = Cout
    (Cin + Cout)
    D = A + I – 1

    View Slide

  9. jgs
    Final Exam Review
    24 lectures

    View Slide

  10. jgs
    The following slides shows some examples
    related to some topics
    This is NOT a comprehensive list of topics
    Topics in the exam can be found
    Weeks 2 to 16
    (Lectures 1 to 24)

    View Slide

  11. jgs
    564 00000100
    Object Oriented Relationships
    Association Directed
    Association
    Reflexive
    Association
    Multiplicity
    Aggregation Composition Generalization Realization

    View Slide

  12. jgs
    564 00000100
    Design Principles
    There are five key design principles to consider in Object-Oriented:
    § Single Responsibility Principle (SRP)
    § Open-Closed Principle (OCP)
    § Liskov Substitution Principle (LSP)
    a child should always be better than its parent.
    § Interface Segregation Principle (ISP)
    broke up interfaces
    § Dependency Inversion Principle (DIP)
    do not call us, we will call you

    View Slide

  13. jgs
    564 00000100
    SRP Example

    View Slide

  14. jgs
    564 00000100
    OCP Example

    View Slide

  15. jgs
    564 00000100
    DIP Example

    View Slide

  16. jgs
    564 00000100
    GoF Patterns

    View Slide

  17. jgs
    564 00000100
    Strategy

    View Slide

  18. jgs
    564 00000100
    Composite

    View Slide

  19. jgs
    564 00000100
    Adapter

    View Slide

  20. jgs
    564 00000100
    Chain of Responsibility

    View Slide

  21. jgs
    564 00000100
    Bridge

    View Slide

  22. jgs
    564 00000100
    Idea 2
    Main
    Factory
    Gift Ball Box Envelop
    Handler
    Supervisor
    Bin
    GUI

    View Slide

  23. jgs
    564 00000100
    Problem

    View Slide

  24. jgs
    564 00000100
    Model-View-Controller

    View Slide

  25. jgs
    564 00000100
    Blackboard

    View Slide

  26. jgs
    564 00000100
    Client-Server
    Client-Server

    View Slide

  27. jgs
    564 00000100
    • Instability = Cout
    (Cin + Cout)
    Stable Abstraction Principle (SAP)

    View Slide

  28. jgs
    564 00000100
    Distance
    § Distance: how far a package is away from
    the Main Sequence
    § D = A + I – 1
    § Values -1 to 1
    § Absolute Distance |D|

    View Slide

  29. jgs
    CSE 564 Computer Systems Fundamentals
    Javier Gonzalez-Sanchez
    [email protected]
    Fall 2020
    Disclaimer. These slides can only be used as study material for the class CSE564 at ASU. They cannot be distributed or used for another purpose.

    View Slide