Download presentation
Presentation is loading. Please wait.
Published byCleopatra Richard Modified over 9 years ago
1
© 2010 John Wiley & Sons Ltd. Software Engineering Modern Approaches Eric Braude and Michael Bernstein 1
2
© 2010 John Wiley & Sons Ltd. Principles of Software Design 2
3
© 2010 John Wiley & Sons Ltd. Learning Goals of This Chapter What are the goals of software design? How do you use various design models for a single application? What are the use case model, the class models, the data flow models, and the state models? How are frameworks used in design? What are the IEEE standards for expressing designs? How does a team prepare for design in practice? Requirements analysis Design Implementation Testing Maintenance Planning The Software Development Lifecycle Phase most relevant to this chapter is shown in bold 3
4
© 2010 John Wiley & Sons Ltd. Goals of Software Design o Sufficiency: handles the requirements o Understandability: can be understood by intended audience o Modularity: divided into well-defined parts o Cohesion : organized so like-minded elements are grouped together o Coupling : organized to minimize dependence between elements 4
5
© 2010 John Wiley & Sons Ltd. Goals of Software Design o Robustness: can deal with wide variety of input o Flexibility: can be readily modified to handle changes in requirements o Reusability: can use parts of the design and implementation in other applications 5
6
© 2010 John Wiley & Sons Ltd. Goals of Software Design o Information hiding : module internals are hidden from others o Efficiency: executes within acceptable time and space limits o Reliability: executes with acceptable failure rate 6
7
© 2010 John Wiley & Sons Ltd. Cohesion and Coupling: Bridge Example 1 234 56 High cohesion (parts belong together) Low coupling (little contact) component 7
8
© 2010 John Wiley & Sons Ltd. Questionable Architecture: High Coupling in Truss High coupling component 8
9
© 2010 John Wiley & Sons Ltd. Aspects of Flexibility Obtaining more or less of what’s already present Example: handle more kinds of accounts without needing to change the existing design or code Adding new kinds of functionality Example: add withdraw to existing deposit function Changing functionality Example: allow withdrawals to create an overdraft 9
10
© 2010 John Wiley & Sons Ltd. Types of Reuse We can reuse …. o Object code (or equivalent) Example: sharing dll’s between word processor and spreadsheet o Classes – in source code form Example: Customer class used by several applications Thus, we write generic code whenever possible o Assemblies of Related Classes Example: the java.awt package o Patterns of Class Assemblies 10
11
© 2010 John Wiley & Sons Ltd. Types of Reuse We can reuse …. o Object code (or equivalent) o Classes – in source code form o Assemblies of Related Classes o Patterns of Class Assemblies 11
12
© 2010 John Wiley & Sons Ltd. Target Application Class model “ State model Use-case model Data Flow model To express requirements, architecture & detailed design Models 12
13
© 2010 John Wiley & Sons Ltd. Target Application Class model “with objects of these classes...” e.g., with Engagement … classes State model “reacting to these events...” e.g., when foreign character enters Use-case model “Do this...” e.g.*, engage foreign character Data Flow model “in this way...” e.g., character scores flow from … to … Models * Video game example 13
14
© 2010 John Wiley & Sons Ltd. Target Application Class model State model Use-case model: Data flow model Use case Scenarios Business use case elaborated by... Sequence diagram Role of Use Case Models 14
15
© 2010 John Wiley & Sons Ltd. Target Application Class model State model Use-case model Data flow model class methods package Consists of... Jacobson et al Role of Class Models 15
16
© 2010 John Wiley & Sons Ltd. Role of Component Model Target Application Class model State model Use-case model Data Flow model Processing element Sub-processing element Data type organized by... Jacobson et al 1 Data store 16
17
© 2010 John Wiley & Sons Ltd. Role of State Models Target Application Class model State model: “reacting to these events” Use-case model Component model States Transitions Substates decompose into... Jacobson et al 17
18
© 2010 John Wiley & Sons Ltd. Rental Framework Rentals RentalCustomers RentalItems 18
19
© 2010 John Wiley & Sons Ltd. Domain classes Design classes Class Model vs. Architecture and Detailed Design Framework classes The detailed design The architecture The Class Model DVD RentalItem 19
20
© 2010 John Wiley & Sons Ltd. Design Comparison Example Candidates Al Pruitt’s Parallel Communicating Processes Event Systems Layered Qualities Sufficiency: handles the requirements 1122 Understandability: can be understood by intended audience 0212 Modularity: divided into well-defined parts 0012 Cohesion : organized so like-minded elements are grouped together 1022 20
21
© 2010 John Wiley & Sons Ltd. Design Comparison Example ctd. Coupling : organized to minimize dependence between elements 0101 Robustness: can deal with wide variety of input 1021 Flexibility: can be readily modified to handle changes in requirements 1011 Reusability: can use parts of the design and implementation in other applications 0012 21
22
© 2010 John Wiley & Sons Ltd. Design Comparison Example, concluded Information hiding : module internals are hidden from others 1122 Efficiency: executes within acceptable time and space limits 1201 Reliability: 0112 TOTALS 681318 22
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.