Class and Method Design

Slides:



Advertisements
Similar presentations
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Advertisements

Chapter 11 Component-Level Design
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
A Brief Introduction to Software Design and Design Quality By Laura Leventhal.
© 2005 Prentice Hall8-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Jump to first page 1 System Design (Finalizing Design Specifications) Chapter 3d.
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved. Slide 1 Key.
Criteria for good design. aim to appreciate the proper and improper uses of inheritance and appreciate the concepts of coupling and cohesion.
PowerPoint Presentation for Dennis, Wixom & Tegarden Systems Analysis and Design Copyright 2001 © John Wiley & Sons, Inc. All rights reserved. Slide 1.
Feb. 23, 2004CS WPI1 CS 509 Design of Software Systems Lecture #5 Monday, Feb. 23, 2004.
Chapter 10 Class and Method Design
Slide 1 Chapter 10 Class and Method Design. Slide 2 REVISITING THE BASIC CHARACTERISTICS OF OBJECT-ORIENTATION.
Tim St. John Masters Computer Engineering Software Engineering Track.
Systems Analysis and Design
CSSE 374: More GRASP’ing and Use Case Realization Steve Chenoweth Office: Moench Room F220 Phone: (812) These.
Systems Analysis and Design in a Changing World, Fifth Edition
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 10: Class and Method.
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
 2004 by SEC Chapter 4 Software Design. 2  2004 by SEC Chapter 4 Software Design 4.1 Design Fundamentals 4.2 Design Method 4.3 Architecture Design
SOFTWARE DESIGN (SWD) Instructor: Dr. Hany H. Ammar
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.
1 Software Design Overview Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13.
Cohesion and Coupling CS 4311
Systems analysis and design, 6th edition Dennis, wixom, and roth
Chapter 13 Design Concepts and Principles Software Engineering: A Practitioner's Approach, 5/e.
Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 10: Class and Method.
CSE 8313 Spr 2003 M. DiazFundamentals of OO Design in UML/Page-Jones1 Object Oriented Principles – Chapter 8 Encapsulation and Connascence Encapsulation.
3-1 Encapsulation and Connascence Encapsulation and connascence are the two fundamental properties of object-oriented systems Encapsulation and connascence.
Sylnovie Merchant, Ph.D. MIS 161 Spring 2005 MIS 161 Systems Development Life Cycle II Lecture 2: Design Issues and OO Design.
9 - Class & Method Design Model Enhancement Design to Code Proposal Presentation.
Chapter : 9 Architectural Design
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 5th Edition Copyright © 2015 John Wiley & Sons, Inc. All rights.
Object Design More Design Patterns Object Constraint Language Object Design Specifying Interfaces Review Exam 2 CEN 4010 Class 18 – 11/03.
11 Systems Analysis and Design in a Changing World, Fifth Edition.
Coupling and Cohesion Schach, S, R. Object-Oriented and Classical Software Engineering. McGraw-Hill, 2002.
Coupling and Cohesion Pfleeger, S., Software Engineering Theory and Practice. Prentice Hall, 2001.
1 Week 7 Software Engineering Spring Term 2016 Marymount University School of Business Administration Professor Suydam.
Design Engineering 1. Analysis  Design 2 Characteristics of good design 3 The design must implement all of the explicit requirements contained in the.
Chapter 1: Software design
School of Business Administration
7. Modular and structured design
Coupling and Cohesion Rajni Bhalla.
Coupling and Cohesion 1.
Design Characteristics and Metrics
Lecture 9- Design Concepts and Principles
Software Design Mr. Manoj Kumar Kar.
Software Engineering: A Practitioner’s Approach, 6/e Chapter 11 Component-Level Design copyright © 1996, 2001, 2005 R.S. Pressman & Associates, Inc.
Object Oriented Concepts -I
TIM 58 Chapter 8: Class and Method Design
Software Design AITI GP John Paul Vergara.
Cohesion and Coupling Chapter 5, Pfleeger 01/01/10.
CIS 375 Bruce R. Maxim UM-Dearborn
INFS 6225 – Object-Oriented Systems Analysis & Design
Component-Level Design
Improving the Design “Can the design be better?”
CS223: Software Engineering
Lecture 9- Design Concepts and Principles
Object Oriented Practices
Software Design Lecture : 9.
Chapter 19: Interfaces and Components
PHÂN TÍCH THIẾT KẾ HƯỚNG ĐỐI TƯỢNG
Sylnovie Merchant, Ph.D. MIS 161 Spring 2005
Communication between modules, cohesion and coupling
Design Module view What module should the system and which have to be developed . It determines the module structure of components.
Cohesion and Coupling.
Systems Analysis and Design with UML Version 2.0, Second Edition
Chapter 8: Design: Characteristics and Metrics
DESIGN CONCEPTS AND PRINCIPLES
Presentation transcript:

Class and Method Design Chapter 14

Key Concepts Low-level or detailed design is critical despite libraries and components Pre-existing classes need to be understood and organized Some, if not all code, is generally still needed to instantiate new classes

DESIGN CRITERIA

Coupling Interdependency among modules Interaction coupling through message passing

Types of Interactive Coupling Level Type Good No Direct Coupling Data Stamp Control Common or Global Bad Content or Pathological

Cohesion “Single-mindedness of a module” Method cohesion Class cohesion Generalization/specialization cohesion

Types of Method Cohesion Level Type Good Functional Sequential Communicational Procedural Temporal or Classical Logical Bad Coincidental

Types of Class Cohesion Level Type Good Ideal Mixed-role Mixed-domain Worse Mixed-instance

Connascence Creating the need to change another module as a result of changing one Minimize overall connascence Minimize across encapsulation boundaries Maximize within encapsulation boundary

OBJECT DESIGN ACTIVITIES

Additional Specification First review the current set of models Sufficient but only necessary classes to solve problem No missing attributes or methods No extraneous attributes or methods Examine visibility

Signatures for each method Name of the method Parameters or arguments to pass Type of value the method will return to the calling method

Identify Opportunities for Reuse Patterns Framework Class libraries Components

Simple Contract Format Method Name: Class Name: ID: Clients (Consumers): Associated Use Cases: Description of Responsibilities: Arguments Received: Type of Value Returned: Pre-Conditions: Post-Conditions:

METHOD SPECIFICATION

Syntax No formal syntax specification General information Events Message Passing Algorithm Specification

Structured English

Pseudocode Example (Get CD-info module) Accept (CD_title) {Required} Accept (CD_artist) {Required} Accept (CD_category) {Required} Accept (CD_length) Return

Summary Translating the basic elements of OO analysis into design requires attention to prevent difficulties and conflicts in execution. Coupling, cohesion, and connascence are proposed for criteria for evaluating design. The designer will look for opportunities to optimize the design, will create constraints and contracts, and will specify methods.