Objectives To introduces the concept of software Design.

Slides:



Advertisements
Similar presentations
Object-Oriented Design
Advertisements

©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design 1.
Chapter 7 – Design and Implementation
©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
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 )
Object-oriented Design
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
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.
Chapter 14: Object-Oriented Design
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
1 Objectives To introduces the concept of software Design. To introduce the concept of Object- Oriented Design (OOD). To Define various aspects about object.
©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
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
With a focus on OO design techniques
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
Object-Oriented Design Yonsei University 2 nd Semester, 2014 Woo-Cheol Kim.
©Ian Sommerville 1995/2000 (Modified by Spiros Mancoridis 1999) Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions.
Chapter 7 System models.
Slide 1 System models. Slide 2 Objectives l To explain why the context of a system should be modelled as part of the RE process l To describe behavioural.
System models l Abstract descriptions of systems whose requirements are being analysed.
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
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 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.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Chapter 12 Object-Oriented Design.
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.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
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.
 To explain why the context of a system should be modelled as part of the RE process  To describe behavioural modelling, data modelling and object modelling.
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.
©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
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 12Slide 1 Chapter 12 Object-Oriented Design.
Object-oriented Design
Object- Oriented Design
With a focus on OO design techniques
Design and Implementation
Object-oriented Design
Presentation transcript:

Objectives To introduces the concept of software Design. To introduce the concept of Object-Oriented Design (OOD). To Define various aspects about object modeling.

Software Design Design is an abstracted representation of a system that captures its constituting parts. Transformation of the analysis model into a more concrete model. Decomposition of a system into sub-systems based on the analysis model of problem domain.

Software Design Is a problem-solving activity You will investigate possible options to met specs. Evaluate solutions and make decisions.

Software Design Attributes Abstraction Identify the important parts and ignore the unnecessary details. Simplicity Avoid function or method complexity (single service) Decomposition & Modularity Replaceable and re-usable. Coupling Interaction among modules. Cohesion Degree of association within a module. Encapsulation Hide module’s properties and control their accessibility.

Goals of software design Correctness Software design must satisfy the requirements for the application. Robustness Able to handle miscellaneous and unusual conditions such as bad data, user error, programmer error, and environmental conditions. Flexibility Separation of interface and implementation. Reusability Efficiency Only use the available resources. Reliability It is relatively bug free. Usability Easy user interface

A checklist for checking some of the goals of software design How can we tell from the code that all required functionality has been handled? (correctness) If the user makes a mistake, does the system crash or perform unpredictably (robustness) Is the system hard to modify, add or remove parts? (flexibility) Does the system execute fast enough? (speed efficiency) Does the system satisfy memory requirements? (space efficiency) Are the class usable for other applications? (reusability)

OO Design Object-oriented design is concerned with developing an object-oriented model of a software system to implement the identified requirements. An object is an entity that has a state and a defined set of operations which operate on that state. Objects are created according to a class definition. Is an instance of class.

Weather system description 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.

OO Design Process The principal activities in any OO design process include: Define the context and modes of use of the system. Design the system architecture. Identify the principal system objects. Develop design models. Specify object interfaces.

Context & Model of use System Context: A static model describes other systems in the environment. Use a subsystem model to show other systems. A model of use: A dynamic model describes how the system interacts with its environment. Use use-cases to show interactions. Both are complementary and necessary to develop an understanding of the relationships between the software being designed and its external environment.

System Context Example

Use-case models Use-case models are used to represent each interaction with the system. A use-case model shows the system features as ellipses and the interacting entity as a stick figure.

Use-case Example

Architecture Once interactions between the system and its environment have been understood, you use this information for designing the system architecture.

Example of Architecture

Identify Objects Identifying objects is the most difficult part of object oriented design. There is no 'magic formula' for object identification. It relies on the skill, experience and domain knowledge of system designers. Object identification is an iterative process. You are unlikely to get it right first time.

Approaches to identification Use a grammatical approach based on a natural language description of the system. Objects and attributes are nouns, operations or services are verbs Base the identification on physical things in the application domain. Application domain, Role, Events, Locations… etc Use a behavioural approach and identify objects based on what participates in what behaviour. Use a scenario-based analysis to identify objects, attributes and methods in each scenario.

Design Models Design models show the objects and classes and relationships between these entities. Static models describe the static structure of the system in terms of classes and relationships at development-time. Dynamic models describe the dynamic interactions between objects at run-time.

Design Models

Examples of design models Sub-system models that show logical groupings of objects into coherent subsystems. Sequence models that show the sequence of object interactions. State machine models that show how individual objects change their state in response to events. Other models include use-case models, generalisation models, specialisation models …etc.

Subsystem models Shows how the design is organised into logically related groups of objects. In the UML, these are shown using packages - an encapsulation construct. The UML annotation is used to label packages as sub-systems.

Example subsystems

Subsystem Decomposition Interface subsystem Includes the objects in the system that are concerned with interfacing the “weather station” to external systems May include other objects from those shown here - e.g. a user interface for testing. Data collection subsystem Includes objects that implement the strategies adopted for data collection These are deliberately separated from the actual data collection to allow for changes to these strategies Instruments subsystem Includes all objects that interface to the instrument hardware

Sequence models Sequence models show the sequence of object interactions that take place Objects are arranged horizontally across the top. Time is represented vertically so models are read top to bottom. Interactions are represented by labelled arrows, Different styles of arrow represent different types of interaction. A thin rectangle in an object lifeline represents the time when the object is the controlling object in the system.

Data collection sequence

Sequence of operations The sequence diagram shows: An external entity, shown as a stick man, (it can be a person or another system) initiates the data collection by sending a request to the interface object The interface object sends a request to the weather station to provide a report for transmission The weather station requests the WeatherData object which maintains all raw weather data to provide a summary that will be included in this report

Statecharts Show how objects respond to different service requests and the state transitions triggered by these requests The states are represented as rounded rectangles State transitions are labelled links between these rectangles

Weather station state diagram

Interfaces Object interfaces have to be specified so that the objects and other components can be designed in parallel. Designers should avoid designing the interface representation but should hide this in the object itself. Objects may have several interfaces which are viewpoints on the methods provided. The UML uses class diagrams for interface specification but Java may also be used.

Weather station interface

Design evolution Hiding information inside objects means that changes made to an object do not affect other objects in an unpredictable way. Assume pollution monitoring facilities are to be added to weather stations. These sample the air and compute the amount of different pollutants in the atmosphere. Pollution readings are transmitted with weather data.

Pollution monitoring

Key points Object-oriented development involves adopting an OO approach at all stages from specification through to programming OO design involves designing the system using objects as the fundamental abstraction and representing the system as an associated set of models. The OO design process involves several stages - discussed here were Context, Architecture and Objects. A range of different models may be produced during an object-oriented design process. These include static and dynamic system models. Object interfaces should be defined precisely using e.g. a programming language like Java. Object-oriented design potentially simplifies system evolution.