Chapter 22 Object-Oriented Design

Slides:



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

©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Visibility Larman, Chapter 19 (with ideas from George Blank of NJIT) CSE432 Object Oriented Software Engineering.
Design Concepts and Principles
Design Phase What’s design?
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
Component-Level Design
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
Object Oriented System Development with VB .NET
March R McFadyen1 GoF (Gang of Four): Gamma, Johnson, Helm & Vlissides Book: Design Patterns: Elements of Reusable Object-Oriented Software.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Software Engineering CSE470: Systems Engineering 35 Computer System Engineering Computer System Engineering is a problem-solving activity. Itemize desired.
1 A Student Guide to Object- Orientated Development Chapter 9 Design.
Chapter 22 Object-Oriented Design
Design Patterns Ref : Chapter 15 Bennett et al. useful groups of collaborating classes that provide a solution to commonly occuring problems. provide.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Object Oriented Analysis & Design
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
chap13 Chapter 13 Programming in the Large.
Patterns in programming 1. What are patterns? “A design pattern is a general, reusable solution to a commonly occurring problem in software. A design.
SOFTWARE DESIGN.
Object Oriented Analysis & Design Software Engineering Lab. Sharif University of Technology.
Systems Analysis and Design in a Changing World, 3rd Edition
L11-12: Design Patterns Definition Iterator (L4: Inheritance)‏ Factory (L4: Inheritance)‏ Strategy (L5: Multiple Inheritance)‏ Composite (L6: Implementation.
ARCHITECTURAL DESIGN. Why is Architecture Important? Representations of software architecture are an enabler for communication between all parties (stakeholders)
CS 8532: Advanced Software Engineering Dr. Hisham Haddad Overview of Object-Oriented Design Highlights of OOD Concepts, Components, and Process.
Introduction to Design Patterns Part 1. © Lethbridge/Laganière 2001 Chapter 6: Using design patterns2 Patterns - Architectural Architectural Patterns:
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 5 Practice: A Generic View Software Engineering: A Practitioner’s Approach, 6/e Chapter.
Software Engineering OO Design. Objectives 1.Describe the Object Oriented design process 2.Detail the UML models produced during OO design.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 6: Using Design Patterns.
Design Patterns Introduction
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 9: Design Engineering Software Engineering: A Practitioner’s Approach, 6/e Chapter.
OBJECT-ORIENTED TESTING. TESTING OOA AND OOD MODELS Analysis and design models cannot be tested in the conventional sense. However, formal technical reviews.
Design Engineering 1. Analysis  Design 2 Characteristics of good design 3 The design must implement all of the explicit requirements contained in the.
1 Lecture Material Design Patterns Visitor Client-Server Factory Singleton.
Design Concepts ch-8
Patterns in programming
CompSci 280 S Introduction to Software Development
Cmpe 589 Spring 2006.
Strategy Design Pattern
Chapter 7 – Object-Oriented Design
Software Design Principles
Chapter 5:Design Patterns
MPCS – Advanced java Programming
Object Oriented Analysis & Design
Systems Analysis and Design With UML 2
Lecture 9- Design Concepts and Principles
Systems Analysis and Design With UML 2
For University Use Only
The Object Oriented Approach to Design
Chapter 6: Using Design Patterns
CIS 375 Bruce R. Maxim UM-Dearborn
INFS 6225 Object-Oriented Systems Analysis & Design
Object-Oriented Analysis
Web Programming Language
Introduction to Design Patterns Part 1
Object-Oriented Design
Design Model Like a Pyramid Component Level Design i n t e r f a c d s
Lecture 9- Design Concepts and Principles
Analysis models and design models
An Introduction to Software Architecture
Chapter 7 Software Engineering.
Chapter 9 Architectural Design.
CS 350 – Software Design Singleton – Chapter 21
Design Patterns Imran Rashid CTO at ManiWeber Technologies.
Design Yaodong Bi.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Chapter 6: Architectural Design
Introduction to OOAD and the UML
Presentation transcript:

Chapter 22 Object-Oriented Design

Object-Oriented Design

OOA and OOD

OOA and OOD

Design Issues decomposability—the facility with which a design method helps the designer to decompose a large problem into subproblems that are easier to solve; composability—the degree to which a design method ensures that program components (modules), once designed and built, can be reused to create other systems; understandability—the ease with which a program component can be understood without reference to other information or other modules; continuity—the ability to make small changes in a program and have these changes manifest themselves with corresponding changes in just one or a very few modules; protection—a architectural characteristic that will reduce the propagation of side affects if an error does occur in a given module.

Generic Components for OOD Problem domain component—the subsystems that are responsible for implementing customer requirements directly; Human interaction component —the subsystems that implement the user interface (this included reusable GUI subsystems); Task Management Component—the subsystems that are responsible for controlling and coordinating concurrent tasks that may be packaged within a subsystem or among different subsystems; Data management component—the subsystem that is responsible for the storage and retrieval of objects.

Generic Steps for OOD Describe each subsystem and allocate it to processors and tasks Choose design strategy for implementing data mgmt, interface support, task mgmt Design control mechanism for system Perform object design Perform message design Create messaging model Review design model and iterate as required

Process Flow for OOD

System Design Process • Partition the analysis model into subsystems. • Identify concurrency that is dictated by the problem. • Allocate subsystems to processors and tasks. • Develop a design for the user interface. • Choose a basic strategy for implementing data management. • Identify global resources and the control mechanisms required to access them. • Design an appropriate control mechanism for the system, including task management. • Consider how boundary conditions should be handled. • Review and consider trade-offs.

Subsystem Design Criteria • The subsystem should have a well-defined interface through which all communication with the rest of the system occurs. • With the exception of a small number of “communication classes,” the classes within a subsystem should collaborate only with other classes within the subsystem. • The number of subsystems should be kept small. • A subsystem can be partitioned internally to help reduce complexity.

System Design

Subsystem Collaboration Table

Subsystem Example

Object Design A protocol description establishes the interface of an object by defining each message that the object can receive and the related operation that the object performs An implementation description shows implementation details for each operation implied by a message that is passed to an object. information about the object's private part internal details about the data structures that describe the object’s attributes procedural details that describe operations

Design Patterns ... you’ll find recurring patterns of classes and communicating objects in many object-oriented systems. These patterns solve specific design problems and make object-oriented design more flexible, elegant, and ultimately reusable. They help designers reuse successful designs by basing new designs on prior experience. A designer who is familiar with such patterns can apply them immediately to design problems without having to rediscover them. Gamma and his colleagues [GAM95]

Design Pattern Attributes The design pattern name is an abstraction that conveys significant meaning about it applicability and intent. The problem description indicates the environment and conditions that must exist to make the design pattern applicable. The pattern characteristics indicate the attributes of the design that may be adjusted to enable the pattern to accommodate into a variety of problems. The consequences associated with the use of a design pattern provide an indication of the ramifications of design decisions.

Example Design Pattern From: http://www.jguru.com/jguru/faq/view.jsp?EID=3434 Consider the Singleton pattern, whose intent reads as follows: Intent: Ensure that a class has one instance, and provide a global point of access to it.

public class Singleton { private static Singleton instance = null; public static Singleton getInstance() if (instance == null) instance = new Singleton(); return instance; } protected Singleton() { ... } // possibly another constructor form public void someMethod() { ... } //... other methods

The programmer would access the single instance of this class by writing something similar to Singleton.getInstance().someMethod() or similar to Singleton s = Singleton.getInstance(); s.method1(); ... s.method2();

For a more complete discussion of the Singleton pattern, see the chapter “Singleton” in the book Design Patterns: Elements of Reusable Object-Oriented Software by the “Gang of Four” (Addison-Wesley, 1995), or the chapter “Singleton” in the book Patterns in Java, Volume 1 by Mark Grand (John Wiley & Sons, 1998). For information about variations on the Singleton Pattern, see the chapter entitled “To Kill a Singleton” in the book Pattern Hatching: Design Patterns Applied by John Vlissides or the article “Implementing the Singleton Pattern in Java” by Rod Waldhoff.