©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.

Slides:



Advertisements
Similar presentations
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design 1.
Advertisements

UML an overview.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Informática II Prof. Dr. Gustavo Patiño MJ
Chapter 1 Object Oriented Analysis and Design. UML, Patterns, and Object-Oriented Analysis and Design  The essential skills for the creation of well-designed,
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
SWE Introduction to Software Engineering
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
Chapter 14: Object-Oriented Design
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Soft. Eng. II, Spr. 2002Dr Driss Kettani, from I. Sommerville1 CSC-3325: Chapter 7 Title : Object Oriented Analysis and Design Reading: I. Sommerville,
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Component-Level Design
© Copyright Eliyahu Brutman Programming Techniques Course.
Teamwork Know each other Compete Leadership Strengths and Weaknesses
Unified Modeling Language
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Introduction To System Analysis and design
With a focus on OO design techniques
Unified Modeling Language
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
Object-Oriented Design Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim.
Introduction To System Analysis and Design
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Systems Analysis & Design 7 th Edition Chapter 5.
CSC480 Software Engineering Lecture 11 September 30, 2002.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design Sumber dari : cc.ee.ntu.edu.tw/~farn/courses/SE/ch14.ppt.
Software Engineering, 8th edition Chapter 14 1 Courtesy: ©Ian Somerville 2006 April 13 th, 2009 Lecture # 16 Object-oriented Design.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Object-oriented Design Designing systems using self- contained objects and object.
1 Object-oriented Design Designing systems using self- contained objects and object classes.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Object-oriented Design Designing systems using self- contained objects and object.
 To explain how a software design may be represented as a set of interacting objects that manage their own state and operations  To describe the activities.
Lecture 1: Introduction to Software Engineering WXGE6103 Software Engineering Process and Practice Object-oriented Design.
CS.436 Software Engineering By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 10 Object-oriented Design Slide 1 1 Chapter 10 Object-oriented Design.
1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.
Object-oriented Design Designing systems using self-contained objects and object classes Designing systems using self-contained objects and object classes.
Chap 10. Object-oriented Design - Designing systems using self-contained objects and object classes -
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Assignment # 3 Due at Class 3/17 l Chapter 9: 2 and 9 l Chapter 11: 1, 4 and.
14. Object-Oriented Design Software Engineering. Objectives To explain how a software design may be represented as a set of interacting objects that manage.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
12/2/2015 1www.prsolutions08.blogspot.com Object-oriented Design.
OBJECT ORIENTED AND FUNCTION ORIENTED DESIGN 1 Chapter 6.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Object-oriented Design. Recap The software architect is responsible for deriving a structural system model, a control model and a sub-system decomposition.
© 2001 Franz Kurfess Object-oriented Design 1 CPE/CSC 205: Software Engineering I Dr. Franz J. Kurfess Computer Science Department Cal Poly.
CMSC 345 Fall 2000 OO Design. Characteristics of OOD Objects are abstractions of real-world or system entities and manage themselves Objects are independent.
Slide 1 Chapter 10 Object-oriented Design. Slide 2 Characteristics of OOD l Objects are abstractions of real-world or system entities and manage themselves.
Object-oriented Design 3/3/20161ICS 413 – Software Engineering.
CHAPTER 6: OBJECT-ORIENTED DESIGN. Objectives  To explain how a software design may be represented as a set of interacting objects that manage their.
Unified Modeling Language. What is UML? Standard language for specifying, visualizing, constructing, and documenting the artifacts of software systems,
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Chapter 5 – System Modeling Lecture 1 1Chapter 5 System modeling.
Chapter 14. Objectives To explain how a software design may be represented as a set of interacting objects that manage their own state and operations.
Chapter 7 – Object-Oriented Design
The Movement To Objects
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Chapter 12 Object-Oriented Design.
Systems Analysis and Design With UML 2
Object-oriented Design
With a focus on OO design techniques
Object-oriented Design
Presentation transcript:

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 2 Objectives l To explain how a software design may be represented as a set of interacting objects that manage their own state and operations l To describe the activities in the object- oriented design process l To introduce various models that can be used to describe an object-oriented design l To show how the UML may be used to represent these models

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 3 Topics covered l Objects and object classes l An object-oriented design process l Design evolution

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 4 Object-oriented development l Object-oriented analysis, design and programming are related but distinct. l OOA is concerned with developing an object model of the application domain. l OOD is concerned with developing an object- oriented system model to implement requirements. l OOP is concerned with realising an OOD using an OO programming language such as Java or C++.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 5 Characteristics of OOD l Objects are abstractions of real-world or system entities and manage themselves. l Objects are independent and encapsulate state and representation information. l System functionality is expressed in terms of object services. l Shared data areas are eliminated. Objects communicate by message passing. l Objects may be distributed and may execute sequentially or in parallel.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 6 Interacting objects

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 7 Advantages of OOD l Easier maintenance. Objects may be understood as stand-alone entities. l Objects are potentially reusable components. l For some systems, there may be an obvious mapping from real world entities to system objects.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 8 Objects and object classes An object is an entity that has a state and a defined set of operations which operate on that state. The state is represented as a set of object attributes. The operations associated with the object provide services to other objects (clients) which request these services when some computation is required. Objects are created according to some object class definition. An object class definition serves as a template for objects. It includes declarations of all the attributes and services which should be associated with an object of that class.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 9 The Unified Modeling Language l Several different notations for describing object- oriented designs were proposed in the 1980s and 1990s. l The Unified Modeling Language is an integration of these notations. l It describes notations for a number of different models that may be produced during OO analysis and design. l It is now a de facto standard for OO modelling.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 10 Employee object class (UML)

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 11 UML associations l Objects and object classes participate in relationships with other objects and object classes. l In the UML, a generalised relationship is indicated by an association. l Associations may be annotated with information that describes the association. l Associations are general but may indicate that an attribute of an object is an associated object or that a method relies on an associated object.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 12 An association model

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 13 An object-oriented design process l Structured design processes involve developing a number of different system models. l They require a lot of effort for development and maintenance of these models and, for small systems, this may not be cost- effective. l However, for large systems developed by different groups design models are an essential communication mechanism.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 14 Object identification l Identifying objects (or object classes) is the most difficult part of object oriented design. l There is no 'magic formula' for object identification. It relies on the skill, experience and domain knowledge of system designers. l Object identification is an iterative process. You are unlikely to get it right first time.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 15 A use case is a summary of scenarios for a single task or goal. An actor is who or what initiates the events involved in that task. Actors are simply roles that people or objects play. The picture below is a Make Appointment use case for the medical clinic. The actor is a Patient. The connection between actor and use case is a communication association (or communication for short). determining features (requirements). New use cases often generate new requirements as the system is analyzed and the design takes shape. communicating with clients. Their notational simplicity makes use case diagrams a good way for developers to communicate with clients. generating test cases. The collection of scenarios for a use case may suggest a suite of test cases for those scenarios

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 16 A Class diagram gives an overview of a system by showing its classes and the relationships among them. Class diagrams are static -- they display what interacts but not what happens when they do interact.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 17 association -- a relationship between instances of the two classes. There is an association between two classes if an instance of one class must know about the other in order to perform its work. In a diagram, an association is a link connecting two classes. aggregation -- an association in which one class belongs to a collection. An aggregation has a diamond end pointing to the part containing the whole. In our diagram, Order has a collection of OrderDetails. generalization -- an inheritance link indicating one class is a superclass of the other. A generalization has a triangle pointing to the superclass. Payment is a superclass of Cash, Check, and Credit.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 18 Packages and object diagrams To simplify complex class diagrams, you can group classes into packages. A package is a collection of logically related UML elements. The diagram below is a business model in which the classes are grouped into packages.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 19 A sequence diagram is an interaction diagram that details how operations are carried out -- what messages are sent and when. Sequence diagrams are organized according to time. The time progresses as you go down the page. The objects involved in the operation are listed from left to right according to when they take part in the message sequence.

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 20 Collaboration diagrams are also interaction diagrams. They convey the same information as sequence diagrams, but they focus on object roles instead of the times that messages are sent. In a sequence diagram, object roles are the vertices and messages are the connecting links.