Chapter 14: Object-Oriented Design

Slides:



Advertisements
Similar presentations
Object-Oriented Design
Advertisements

Object- Oriented Design
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design 1.
Chapter 7 – Design and Implementation
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Software Design l Objectives To explain how a software design may be represented.
Chapter 7 – Object-Oriented Design
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
SWE Introduction to Software Engineering
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
7M701 1 Software Engineering Object-oriented Design Sommerville, Ian (2001) Software Engineering, 6 th edition: Chapter 12 )
Object-oriented Design
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
1 SWE Introduction to Software Engineering Lecture 25 – Object-Oriented Design (Chapter 14)
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Objectives To introduces the concept of software Design.
1 Objectives To introduces the concept of software Design. To introduce the concept of Object- Oriented Design (OOD). To Define various aspects about object.
Soft. Eng. II, Spr. 2002Dr Driss Kettani, from I. Sommerville1 CSC-3325: Chapter 7 Title : Object Oriented Analysis and Design Reading: I. Sommerville,
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented design 2.
©Ian Sommerville 2006Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Component-Level Design
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
Teamwork Know each other Compete Leadership Strengths and Weaknesses
With a focus on OO design techniques
Chapter 4 System Models A description of the various models that can be used to specify software systems.
1 CS 456 Software Engineering. 2 Contents 3 Chapter 1: Introduction.
Object-Oriented Design Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
CSC480 Software Engineering Lecture 11 September 30, 2002.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
©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.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Chapter 12 Object-Oriented Design.
CMSC 345 Fall 2000 Design. What is Design? Verb: The creative process of transforming the problem into the solution Noun: The description of the solution.
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.
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.
12/2/2015 1www.prsolutions08.blogspot.com Object-oriented Design.
OBJECT ORIENTED AND FUNCTION ORIENTED DESIGN 1 Chapter 6.
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.
©Ian Sommerville 2000 Software Engineering. Chapter 14Slide 1 Chapter 14 Object-Oriented Design.
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.
Chapter 7 Lecture 1 Design and Implementation. Design and implementation Software design and implementation is the stage in the software engineering process.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
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 2: Component Level Design
Design Review.
Case Study -- Weather system
Chapter 5 – Design and Implementation
Chapter 7 – Object-Oriented Design
CH#3 Software Designing (Object Oriented Design)
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Chapter 12 Object-Oriented Design.
Software Engineering Unit- 5 Engineered for Tomorrow CSE, MVJCE.
Object-oriented Design
Object- Oriented Design
With a focus on OO design techniques
Design and Implementation
Object-oriented Design
Presentation transcript:

Chapter 14: Object-Oriented Design based on abstractions of real-world or system entities objects manage a private state communication by message passing advantages obvious map to real-world easier to debug due to reduced system coupling easier reuse easier maintenance (objects are stand-alone entities) Functional design based on interacting functional components of a solution functions share a global state communication via shared variables advantages functional data flow may be more intuitive more obvious control model

Object-oriented development Three related but distinct OO stages analysis (OOA) : develop an object model of the application domain design (OOD): develop an object-oriented system model to implement requirements programming (OOP) : realize an OOD using an OO language such as C++ Commonalities: identifying objects, attributes and services organizing objects into an aggregation hierarchy constructing object-use descriptions to show how services are used specifying object interfaces

Passive and active objects Passive objects all state changes effected through operations defined in the object interface e.g. aStack.Push(item) Active objects can change their own state e.g. an object might have a (private) timer to update its state every 100 ms (similar to JavaScript setTimeout)

14.2 Object identification The most difficult part of object oriented design No 'magic formula' for object identification Relies on skill, experience, and domain knowledge Iterative--you are unlikely to get it right first time How is this like anything else you do well? Approaches grammatical based on a description of the system: nouns are objects, adjectives are attributes, verbs are operations identify tangible things in the application domain behavioral, identifying objects based on what participates in what behavior scenario analysis

An office information system The Office Information Retrieval System (OIRS) is an automatic file clerk which can file documents under some name in one or more indexes, retrieve documents, display and maintain document indexes, archive documents and destroy documents. The system is activated by a request from the user and always returns a message to the user indicating the success or failure of the request.

An office information system The Office Information Retrieval System (OIRS) is an automatic file clerk which can file documents under some name in one or more indexes, retrieve documents, display and maintain document indexes, archive documents and destroy documents. The system is activated by a request from the user and always returns a message to the user indicating the success or failure of the request. File Retr ie v e Archiv Destro y Document Name Displa Delete entr Add entr Inde x Put message User Retrie al system Name Name Diff names for the same object obvious knowledge left out (index has a name, documents have owners GO to behavoiral approach Go to use case diagrams User command Get command

Weather mapping system A weather mapping system is required to generate weather maps on a regular basis using data collected from remote, unattended weather stations and other data sources such as weather observers, balloons and satellites. Weather stations transmit their data to the area computer in response to a request from that machine. The area computer system validates the collected data and integrates it with the data from different sources. The integrated data is archived and, using data from this archive and a digitised map database a set of local weather maps is created. Maps may be printed for distribution on a special-purpose map printer or may be displayed in a number of different formats. Will look at this two ways 1. non-layered 2. layered

Top-level architectures Non-layered Layered «subsystem» Data collection Data processing Data archiving Data display Data collection layer where objects are concerned with acquiring data from remote sources Data processing layer where objects are concerned with checking and integ rating the collected data Data archiving layer where objects are concerned with storing the data for future processing Data display layer where objects are concerned with preparing and presenting the data in a human- readable form

Subsystems derived from layered view

Comment on notation The design is organized into logically related groups of objects In the UML, these are encapsulated using packages This is a logical model The actual organization of objects in the system may be different Next step: decompose weather station subsystem

Weather station objects Use domain knowledge to identify more objects and operations weather stations should have a unique identifier weather stations are remotely situated so instrument failures have to be reported automatically, therefore attributes and operations for self-checking are required Active or passive objects? in this case, objects are passive and collect data on request rather than autonomously this introduces flexibility at the expense of controller processing time What are the objects inside this? Identifier W eather data Instr ument status Initializ e T r ansmit data ansmit status Self test Shut do wn eather station

Hardware control objects est W ind v ane Direction Reset Rain gaug e Rainf all Calibr ate Bar ometer Pressure Height Air thermometer emper ature Gr ound Anemometer thermometer T emper ature Wind speed T est T est Calibr ate Hardware objects correspond directly to sensors or actuators connected to the system They conceal the details of the hardware control e.g. buffer address, masking bit pattern etc. Hardware changes can often be introduced by hardware object re-implementation

Weather data objects Air temper ature data Ground temper Wind speed data Wind direction data Pressure Rainf all Mak e readings Process data W eather data Readings Maxim um Minim A v er age Read T emperature data Max. gust ind speed data W ind direction Rainfall data Readings Cum ulativ e Read Read

Weather station subsystems (layered)

Object interface design Specify the detail of the object interfaces so that objects can be developed in parallel This means defining attribute types the signatures and semantics of object operations Use a programming language to achieve precision Avoid representation information i n t e rf a c e We h r S ti o { p u b li v d We at he ta ( ) ; s () (I st me i) w m en t i ep or tW In nt al e ( I g D } //

Design evolution How would you add pollution monitoring facilities to the weather stations? (to sample the air and compute the amounts of different pollutants) (pollution readings are transmitted with weather data) Changes required: add an object class called AirQuality as part of WeatherStation. add an operation reportAirQuality to WeatherStation. Modify the control software to collect pollution readings. add objects representing pollution monitoring instruments. W eatherStation Air quality P ollution monitoring instruments identifier NOData smok eData repor tW eather () NOmeter SmokeMeter benz eneData repor tAirQuality () calibrate (instruments) collect () test () BenzeneMeter summarise () star tup (instruments) shutdown (instruments)

Weather station subsystems (layered) Inter face Data collection CommsController W eatherData Instrument W eatherStation Status «subsystem» Instruments Air thermometer RainGauge Anemometer Ground Barometer W indV ane thermometer NO meter Smoke meter Benzine meter

Other pieces mentioned in text State machines show responses to requests for services Sequence diagrams show interactions among objects