Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSC509 Lecture 04

CSC509 Lecture 04

Software Design
Connecting the Dots
(202310)

Javier Gonzalez-Sanchez

October 04, 2023
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs
    CSC 509
    Software Engineering II:
    Modeling and Design
    Lecture 04:
    Connecting the Dots
    Dr. Javier Gonzalez-Sanchez
    [email protected]
    www.javiergs.com
    Building 14 -227
    Office Hours: By appointment

    View full-size slide

  2. jgs
    Previously…

    View full-size slide

  3. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 3
    Relationships
    Association Directed
    Association
    Reflexive
    Association
    Multiplicity
    Aggregation Composition Generalization Realization

    View full-size slide

  4. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 4
    Relationships
    Association Directed
    Association
    Reflexive
    Association
    Multiplicity
    Aggregation Composition Generalization Realization

    View full-size slide

  5. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 5
    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)
    § Interface Segregation Principle (ISP)
    § Dependency Inversion Principle (DIP)

    View full-size slide

  6. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 6
    Design
    VS

    View full-size slide

  7. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 7
    Key idea
    § Keep it Simple - over-designing the system is as bad as their absence
    when needed.
    § A design that is more than what we need smells.
    § Design principles are not a perfume to be liberally scattered all over the
    system.

    View full-size slide

  8. jgs
    Test Yourselves

    View full-size slide

  9. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 9
    This Looks Good

    View full-size slide

  10. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 10
    DIP Example

    View full-size slide

  11. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 11
    DIP Example
    What about ISP?

    View full-size slide

  12. jgs
    We need to do a Project

    View full-size slide

  13. jgs
    Let Us Talk About A Project

    View full-size slide

  14. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 14
    Reference
    Read:
    Wettel, R. & Lanza, M. (2007). Visualizing Software Systems as Cities. 2007
    4th IEEE International Workshop on Visualizing Software for Understanding
    and Analysis, 92–99. https://doi.org/10.1109/vissof.2007.4290706

    View full-size slide

  15. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 15
    Project

    View full-size slide

  16. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 16
    § A Tree is an Interface.
    § A rock is an Abstract Class.
    § A house is a Class.
    The size of the house represents the size (number of
    methods and attributes) of a Class.

    View full-size slide

  17. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 17
    Requirements

    View full-size slide

  18. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 18
    Requirements

    View full-size slide

  19. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 19
    Project

    View full-size slide

  20. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 20
    Let’s Work

    View full-size slide

  21. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 21
    Questions

    View full-size slide

  22. jgs
    Patterns
    Software Design

    View full-size slide

  23. jgs
    Javier Gonzalez-Sanchez | CSC 509 | Fall 2023 | 23
    GoF Patterns

    View full-size slide

  24. jgs
    CSC 509 Software Design
    Javier Gonzalez-Sanchez, Ph.D.
    [email protected]
    Fall 2023
    Copyright. These slides can only be used as study material for the class CSC509 at Cal Poly.
    They cannot be distributed or used for another purpose.

    View full-size slide