OBJECT-ORIENTED Design

Slides:



Advertisements
Similar presentations
Object Oriented Analysis And Design-IT0207 iiI Semester
Advertisements

CRC Before you can build an object-oriented system, you have to define the classes (objects) that represent the problem to be solved, how the classes relate.
Software Design Fundamentals
Ch:8 Design Concepts S.W Design should have following quality attribute: Functionality Usability Reliability Performance Supportability (extensibility,
Ch 3 System Development Environment
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Elliott Bays, Taylor Ivy, Mark Sarosky, David Martin, Ovidiu Ravasan.
Introduction To System Analysis and Design
Lecture 4 Class Responsibility Collaboration Cards
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
Object Oriented Analysis Process
Lecture 3 Object Concepts II
Chapter 3: Object-Oriented Design Presentation slides for Object-Oriented Programming by Yahya Garout KFUPM Information & Computer Science Department.
SOS OOP Fall 2001 Object Oriented Programming in Java Week 1 Read a design Design a small program Extract a design Run a VAJ program Change that program,
WEL COME PRAVEEN M JIGAJINNI PGT (Computer Science) MCA, MSc[IT], MTech[IT],MPhil (Comp.Sci), PGDCA, ADCA, Dc. Sc. & Engg.
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
C++ fundamentals.
The chapter will address the following questions:
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Introduction To System Analysis and design
OO Analysis and Design CMPS OOA/OOD Cursory explanation of OOP emphasizes ▫ Syntax  classes, inheritance, message passing, virtual, static Most.
Object Oriented Software Development
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
1 Object-Oriented Testing CIS 375 Bruce R. Maxim UM-Dearborn.
Welcome to OBJECT ORIENTED PROGRAMMIN Date: 10/09/2014 Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
CSCI-383 Object-Oriented Programming & Design Lecture 9.
CSSE 501 Object-Oriented Development. Today…  Chapter 3: Object-Oriented Design.
Introduction To System Analysis and Design
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
CSCI-383 Object-Oriented Programming & Design Lecture 13.
Chapter 17 GRASP: Designing Objects with Responsibilities. 1CS6359 Fall 2011 John Cole.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
CSSE 501 Object-Oriented Development. Today…  Chapter 3: Object-Oriented Design.
1 Systems Analysis and Design in a Changing World, Thursday, January 18, 2007.
Systems Analysis and Design in a Changing World, 3rd Edition
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 05. Review Software design methods Design Paradigms Typical Design Trade-offs.
GRASP: Designing Objects with Responsibilities
CSCI 383 Object-Oriented Programming & Design Lecture 8 Martin van Bommel.
Lecture 3 : Object Oriented Design (chapter 3. of Timothy Budd’s “Intro to OOP” book) Acknowledgement : courtesy of Prof. Timothy Budd lecture slides.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
1 What is OO Design? OO Design is a process of invention, where developers create the abstractions necessary to meet the system’s requirements OO Design.
Computing and SE II Chapter 9: Design Methods and Design Models Er-Yu Ding Software Institute, NJU.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
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.
Object-Oriented Principles Applications to Programming.
111 Subsystems CS 4311 Wirfs Brock et al., Designing Object-Oriented Software, Prentice Hall, (Chapter 7)
CSCI-383 Object-Oriented Programming & Design Lecture 7.
Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
Lecture 3 : Object Oriented Design (chapter 3
Modern Systems Analysis and Design Third Edition Chapter 2 Succeeding as a Systems Analyst 2.1.
CSIS 4850: CS Senior Project – Spring 2009 CSIS 4850: Senior Project Spring 2009 Object-Oriented Design.
1 SYS366 Week 1 - Lecture 1 Introduction to Systems.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
OBJECT-ORIENTED TESTING. TESTING OOA AND OOD MODELS Analysis and design models cannot be tested in the conventional sense. However, formal technical reviews.
Welcome to OBJECT ORIENTED PROGRAMMING Prepared By Prepared By : VINAY ALEXANDER PGT(CS) KV jhagrakhand.
SOFTWARE DESIGN & SOFTWARE ENGINEERING Software design is a process in which data, program structure, interface and their details are represented by well.
 The Object Oriented concepts was evolved for solving complex problems. Object- oriented software development started in the 1980s. Object-oriented design.
Design Concepts ch-8
An informal, team oriented, OO design system
GRASP – Designing Objects with Responsibilities
Programming paradigms
Unified Modeling Language
Objectives State the reasons for the complexity involved in the development of software Define the following terms Objects Classes Messages Methods Explain.
Software Quality Engineering
The Object-Oriented Thought Process Chapter 05
Analysis models and design models
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Presentation transcript:

OBJECT-ORIENTED Design Ziya Karakaya ATILIM UNIVERSITY E-Mail : ziya@atilim.edu.tr

Outline Programming in the Large versus Programming in the Small Responsibility Driven Design Scenarios Components Software Life Cycle

Responsibility Implies Noninterference Working in an OOL is neither necessary nor sufficient condition for doing OOP. An OOP is like a community of interacting indivisuals, each having assigned responsibilities, Major benefits of OOP can be seen when using a subsystem from one projects to the other. Major aspects in the design of such a community is determining the specific responsibilities for each individuals

Responsibility Implies Noninterference (cont) Responsibility implies a degree on independence or noninterference Difference between actively supervising a child and delegating to his responsibility is similar to conventional and OO programming. By specification and delegation, practitioners of OOD have developed a technique, which is called Responcibility-Driven Design (RDD).

Programming in the small and in the large One programmer, understands everything from top to bottom. Major problem is the development of algorithms. Programming in the Large: System is developed by large team of programmers Major problems are management of details and communication between programmers and between their respective software subsystems.

Why Begin With Behaviour? Behaviour of a system is usually understood long before any other aspects. In old design techniques, we were concetrating on data structure, and sequence of function call, with formal specification. Behaviour can be described almost from the moment an idea is conceived, and can be understandable by client and programmer.

Basis for Design Consider for the moment what aspects of a problem are known first: Data Structures Functions Behavior A design technique based on behavior can be applied from the very beginning of a problem, whereas techniques based on more structural properties necessarily require more preliminary analysis.

Responsibility Driven Design A design technique that has the following properties: Can deal with ambiguous and incomplete specifications. Naturally flows from Analysis to Solution. Easily integrates with various aspects of software development.

Directed Evolution Let us take specifications as they occur in nature Imprecise Ambiguous Unclear and rather than attempt to change human nature, let us direct the evolution of the specification in concern with the design of the software system.

An Example, the IIKH Imagine you are the chief software architect in a major computing firm. The president of the firm rushes into your office with a specification for the next PC-based product. It is drawn on the back of a dinner napkin. Briefly, the Intelligent Interactive Kitchen Helper will replace the box of index cards of recipes in the average kitchen.

Abilities of the IIKH Here are some of the things a user can do with the IIKH: Browse a database of Recipes Add a new recipe to the database Edit or annotate an existing recipe Plan a meal consisting of several courses Scale a recipe for some number of users Plan a longer period, say a week Generate a grocery list that includes all the items in all the menus for a period

Characterization by Behavior Just as an Abstract Data Type is characterized more by behavior than by representation, the goal in using Responsibility Driven Design will be to first characterize the application by behavior. First capture the behavior of the entire application. Refine this into behavioral descriptions of subsystems. Refine behavior descriptions into code. This is the fundamental aspect of OOP

Working Through Scenarios Because of the ambiguity in the specification, the major tool we will use to uncover the desired behavior is to walk through application scenarios. Pretend we had already a working application. Walk through the various uses of the system. Establish the ``look and feel'' of the system. Make sure we have uncovered all the intended uses. Develop descriptive documentation. Create the high level software design.

Software Components A software component is simply an abstract design entity with which we can associate responsibilities for different tasks. May eventually be turned into a class, a function, a module, or something else. A component must have a small well defined set of responsibilities A component should interact with other components to the minimal extent possible

CRC Cards Components are most easily described using CRC cards. A CRC card records the name, responsibilities, and collaborators of an component. Component Name Description of Responsibilies Collaborators Other Components Inexpensive, Erasable, Physical

The first component, The Greeter Let us return to the development of the IIKH. The first component your team defines is the Greeter. When the application is started, the greeter puts an informative and friendly welcome window on the screen. Offer the user the choice of several different actions Casually browse the database of recipes. Add a new recipe. Edit or annotate a recipe. Review a plan for several meals. Create a plan of meals.

The Greeter CRC Card Greeter Collaborators Display Informative Initial Message Offer User Choice of Options Pass Control to either Recipe Database Manager or Planner for processing Collaborators Database Manager Planner

The Recipe Database Component Ignoring the planning of meals for the moment, your team elects to next explore the recipe database component. Must Maintain the Database of Recipes. Must Allow the user to browse the database. Must permit the user to edit or annotate an existing recipe. Must permit the user to add a new recipe.

Postponing Decisions Many decisions, such as the method of browsing, can be ignored for the moment, as they are entirely encapsulated within the recipe database component, and do not effect other components. Scroll bars and windows? A virtual ``book'' with thumb-holes and flipping pages? Keywords and phrases? Only need to note that somehow the user can manipulate the database to select a specific recipe.

Responsibilities of a Recipe We make the recipe itself into an active data structure. It maintains information, but also performs tasks. Maintains the list of ingredients and transformation algorithm. Must know how to edit these data values. Must know how to interactively display itself on the output device. Must know how to print itself. We will add other actions later (ability to scale itself, produce integrate ingredients into a grocery list, and so on).

The Planner Component Returning to the greater, we start a different scenario. This leads to the description of the Planner. Permits the user to select a sequence of dates for planning. Permits the user to edit an existing plan. Associates with Date object.

The Date Component The Date component holds a sequence of meals for a sequence of dates. User can edit specific meals. User can annotate information about dates (''Bob's Birthday'', ``Christmas Dinner'', and so on). Can print out grocery list for entire set of meals.

The Meal Component The Meal component holds information about a single meal. Allows user to interact with the recipe database to select individual recipes for meals. User sets number of people to be present at meal, recipes are automatically scaled. Can produce grocery list for entire meal, by combining grocery lists from individual scaled recipes.

The Six Components Having walked through the various scenarios, you team eventually decides everything can be accomplished using only six software components. Greeter RecipeDatabase Planner Dtae Meal Recipe

Characteristics of Components Let us return to the idea of a software component. There are many different aspects to this simple idea, we will consider just a few: Behavior and State Instances and Classes Coupling and Cohesion Interface and Implementation

Behavior and State All components can be characterized by two aspects: The behavior of a component is the set of actions a component can perform. The complete set of behavior for a component is sometimes called the protocol. The state of a component represents all the information (data values) held within a component. Notice that it is common for behavior to change state. For example,the edit behavior of a recipe may change the preparation instructions,which is part of the state.

Instances and Classes We can now clarify a point we earlier ignored. There are likely many instances of recipe, but they will all behave in the same way. We say the behavior is common to the class of recipes. Since earlier our goal was to identify behavior, we ignored this distinction and concentrated on prototypical objects.

Coupling and Cohesion The separation of tasks into the domains of different components should be guided by the concepts of coupling and cohesion. Cohesion is the degree to which the tasks assigned to a component seem to form a meaningful unit. Want to maximize cohesion. Coupling is the degree to which the ability to fulfill a certain responsibility depends upon the actions of another component. Want tominimize coupling.