CSCI 3428: Software Engineering Tami Meredith Chapter 6 Designing the Modules.

Slides:



Advertisements
Similar presentations
Lecture 6: Software Design (Part I)
Advertisements

Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Chapter 11 Component-Level Design
Design Concepts and Principles
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Software Requirements Engineering
Software Engineering and Design Principles Chapter 1.
The Architecture Design Process
Design The goal is to design a modular solution, using the techniques of: Decomposition Abstraction Encapsulation In Object Oriented Programming this is.
Criteria for good design. aim to appreciate the proper and improper uses of inheritance and appreciate the concepts of coupling and cohesion.
Fall 2007CS 2251 Software Engineering Intro. Fall 2007CS 2252 Topics Software challenge Life-cycle models Design Issues Documentation Abstraction.
PVK-Ht061 Contents Introduction Requirements Engineering Project Management Software Design Detailed Design and Coding Quality Assurance Maintenance.
Chapter 1 Principles of Programming and Software Engineering.
Object-Oriented Design
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Data Abstraction: The Walls
PVK-Ht051 Contents Introduction Requirements Engineering Project Management Software Design Detailed Design and Coding Quality Assurance Maintenance.
Contents Introduction Requirements Engineering Project Management Software Design Detailed Design and Coding Quality Assurance.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Developed by Reneta Barneva, SUNY Fredonia Component Level Design.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
Systems Analysis and Design in a Changing World, Fifth Edition
Design Patterns OOD. Course topics Design Principles UML –Class Diagrams –Sequence Diagrams Design Patterns C#,.NET (all the course examples) Design Principles.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
SOFTWARE DESIGN (SWD) Instructor: Dr. Hany H. Ammar
Chapter 9 Moving to Design
1 Software Design Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13, 5 th edition and Ch. 10, 6 th edition.
SOFTWARE DESIGN Design Concepts Design is a meaningful engineering representation of something that is to be built It can be traced to a customer’s requirements.
Sommerville, Mejia-Alvarez, 2009Software Engineering, Slide 1 Software Design u Deriving a solution which satisfies software requirements.
Cohesion and Coupling CS 4311
Systems Analysis and Design in a Changing World, 3rd Edition
Systems analysis and design, 6th edition Dennis, wixom, and roth
Chapter 7 Software Engineering Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Chapter 10 Software Engineering. Understand the software life cycle. Describe the development process models. Understand the concept of modularity in.
Computing and SE II Chapter 9: Design Methods and Design Models Er-Yu Ding Software Institute, NJU.
Object-Oriented Design
Software Design: Principles, Process, and Concepts Getting Started with Design.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Designing Classes. Software changes Software is not like a novel that is written once and then remains unchanged. Software is extended, corrected, maintained,
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 11a: Component-Level Design Software Engineering: A Practitioner’s Approach, 6/e Chapter.
Dr D. Greer, Queens University Belfast )Chapter Six 1 Software Engineering Chapter Six Software Design Quality Learning Outcomes.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
1 Software Design Lecture What’s Design It’s a representation of something that is to be built. i.e. design  implementation.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Object-Oriented Design. 1 Objects and concerns Objects have a concern, meaning they have a purpose Not concerned as in worried All code should have a.
CHAPTER 3 MODELING COMPONENT-LEVEL DESIGN.
11 Software Design CSCU 411 Software Engineering.
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Week 6: Software Design HNDIT Software Engineering Software Design Learning Outcomes  Understand the activities involved in the Design process.
Chapter 2 Principles of Programming and Software Engineering.
Chapter 9: Coupling & Cohesion Omar Meqdadi SE 273 Lecture 9 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Basic Characteristics of Object-Oriented Systems
11 Systems Analysis and Design in a Changing World, Fifth Edition.
The Software Lifecycle Stuart Faulk. Definition Software Life Cycle: evolution of a software development effort from concept to retirement Life Cycle.
Principles of Programming & Software Engineering
CompSci 280 S Introduction to Software Development
Coupling and Cohesion 1.
which satisfies software requirements
Lecture 9- Design Concepts and Principles
Principles of Programming and Software Engineering
The Object Oriented Approach to Design
CIS 375 Bruce R. Maxim UM-Dearborn
Chapter 6 Designing the Modules Shari L. Pfleeger Joanne M. Atlee
Component-Level Design
Software Design CMSC 345, Version 1/11.
Lecture 9- Design Concepts and Principles
CSE403 Software Engineering Autumn 2000 Design (Overview)
Software Design Lecture : 8
Applying Use Cases (Chapters 25,26)
Presentation transcript:

CSCI 3428: Software Engineering Tami Meredith Chapter 6 Designing the Modules

Design Not really any boundary between architecture and module-level design Generally done by senior developers Refactoring is often done when a design becomes overly complex Opportunistic – both top-down (analysis) and bottom- up (synthesis) is used Tends to increase in importance with the size of the project

Faking the Process (Parnas & Clements, 1986) Applies to more than just design We know that changes, unknowns, and other factors require an iterative approach But, if we TRY to follow a defined process: 1) It can provide guidance when we are unsure 2) It can help us get closer to a better result 3) It is easier to measure progress Thus, even though we know we can't apply any process perfectly, we should try our best to do so Can use placeholders (ToDo's), Refactoring as necessary

Principles 1. Modularity 2. Interfaces 3. Information hiding 4. Incremental development 5. Abstraction 6. Generality

Modularity We want to achieve Separation of Concerns A module is any programming unit, e.g., library, package, class, ADT, module, file Modules should have a single, clearly defined, purpose Measure modularity using  coupling: amount of interconnection and dependence between modules  cohesion: amount of interconnection and dependence between elements of a single module

Coupling Strive for LOOSE coupling Minimise the dependencies and interconnections between modules 1. Uncoupled: Modules are unrelated [LEAST] 2. Data Coupling: Pass simple (primitive) data 3. Stamp Coupling: Pass complex data structures 4. Control Coupling: One module influences the behaviour (i.e., control flow) of another 5. Common Coupling: Shared (common) data 6. Content Coupling: Module modifies another [MOST]

Cohesion Strive for TIGHT cohesion Want a module's components to be related and relevant to the module Informational: Functional cohesion + data abstraction [MOST] Functional: 1. All elements of a single behaviour are in the same module 2. All of the elements are essential for that behaviour Communicational: Functions get/send/manage the same data (e.g., both read same sensor) Procedural: Functions show an execution sequence Temporal: Functions execute at the same time (e.g., all the set-up code for a program) Logical: Use the same code differently Coincidental: Functions not related [LEAST]

Interfaces Defines the services offered by the module Usually provides the definitions in terms of (type) signatures for access functions Try to keep as small as possible Is the basis of the Design by Contract approach Specification describes the externally visible properties 1. Purpose (general description) 2. Preconditions (assumptions) 3. Protocols (usage restrictions etc.) 4. Postconditions (all external effects) 5. Quality attributes (performance etc.)

Information Hiding Design decisions are hidden – i.e., module can be rewritten without changing interface Structuring using ADTs Minimises coupling Increases cohesion Strive for self-containment

Incremental Development Recursive cycles can require large amounts of code to be produced before testing Techniques such as sandwiching or dependency inversion can be used to break cycles but lead to more complex design Incremental development leads to higher programmer morale Aim to get a working product ASAP and keep it working as its improved and/or extended Gives us something we can show customer

Abstraction We tend to break the system into a hierarchy of increasingly detailed abstractions Designs generally should support abstraction Somewhat like layered architecture, but smaller scale

Generality Try to make each module as general as possible to improve reuse E.g., a sort that works on any data type Can lead to gold-plating Helped by polymorphism How: 1. Parameterise context-specific information 2. Remove preconditions 3. Simplify postconditions (simpler parts)

6.3 Objects Inheritance = implementation inheritance which need NOT be linked to sub-type hierarchy Polymorphism = inclusion (subtype) polymorphism which is NOT parametric polymorphism (or ad-hoc polymorphism) ADTs do not need objects to implement OO Implementations are slower at runtime because of the need for runtime type information to resolve over-riding Can add unneeded complexity to designs Works best for simulations

Using UML 1) Requirements: Use-Case diagrams, Activity diagrams 2) Architecture: Component diagrams, Deployment diagrams 3) Design: Sequence diagrams, Communication diagrams Class, Object, & Package diagrams Activity diagrams State diagrams

UML in Action Useful for formal settings Not usually done by entry-level programmers Generally linked to OO Implementations Good support for some Transformational development model Considered a specialised type of software engineering (OO SE) Not as general-purpose as some advocates suggest Did not solve the "Software Crisis"

5 Surveys Famous Moments in Software Engineering 1. Robbins-Gioia (2001) Implementation of ERP (Enterprise Resource Planning) Package 232 Respondents: 36% had or were impl. ERP 51%: ERP Unsuccessful 46%: Did not think org. knew how to use it 56%: Had a program mgmt office in place (and of these 36% considered the ERP unsuccessful) 2. KPMG Canada (1997) 1450 Leading Public/Private Organisations (176 responses) 25 billion (CAD) spent 61% considered projects to have failed 75%+ blew schedule by 30% or more

3. Conference Board Survey (2001) 117 Companies that attempted ERP 34% Very satisfied, 58% Somewhat satisfied, 8% Unhappy 40% Failed to achieve business goals in 1 year For those who achieved goals, took 6 months longer than expected 25% over budget, Support costs 20% too low 4. Chaos Report (1995) 31% of projects cancelled before they are finished 52% of projects will cost over 189% of estimate 81 billion USD spent on 80K cancelled projects (1995) 16.2% completed on time and on budget (but only 9% for large companies) Only 42% of the proposed features implemented (large companies) and 74% (small companies) 48% of IT executives believe the failure rate is rising

5. OASIG (1995) 45 Expert consultants/professors 20 years avg. experience (900 total) 14k projects considered 7 out of 10 IT projects fail in some way Success rate < 30%