Introduction zObject-oriented design. zUnified Modeling Language (UML). 1 © 2010 Husam Alzaq Computers as Components.

Slides:



Advertisements
Similar presentations
ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
Advertisements

Object-Oriented Application Development Using VB.NET 1 Chapter 5 Object-Oriented Analysis and Design.
Modeling Main issues: What do we want to build How do we write this down ©2008 John Wiley & Sons Ltd. vliet.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall A.1.
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Software Requirements Engineering
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Lecturer: Dr. AJ Bieszczad Chapter 66-1 Object-Oriented analysis and design Special nature of OO development Use cases Design with UML OO system design.
Chapter 1 Embedded Computing 金仲達教授 清華大學資訊工程學系 (Slides are taken from the textbook slides)
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix.
Data Analysis (and User Interaction) GEOG 463 5/7/04.
UML Sequence Diagrams Eileen Kraemer CSE 335 Michigan State University.
© 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed. Introduction Object-oriented design. Unified Modeling Language (UML). 1.
Slide 1 Chapter 8 Behavioral Modeling. Slide 2 Key Ideas Behavioral models describe the internal dynamic aspects of an information system that supports.
Unified Modeling Language
Unified Modeling Language(UML) BY
The Unified Modeling Language (UML) Class Diagrams.
UML Sequence Diagrams Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Chapter 1 Introduction to Computers and C++ Programming.
Computers as Components Principles of Embedded Computing System Design Dr. Prof. Huang Tingle Group of IIPI Guilin University of Electronic Technology.
INTROSE Introduction to Software Engineering Raymund Sison, PhD College of Computer Studies De La Salle University Analysis Modeling.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
BCS 2143 Introduction to Object Oriented and Software Development.
(C) 2009 J. M. Garrido1 Object Oriented Simulation with Java.
© 2000 Morgan Kaufman Overheads for Computers as Components Introduction zWhat are embedded systems? zChallenges in embedded computing system design.
CIT UPES | Sept 2013 | Unified Modeling Language - UML.
The Software Development Life Cycle: An Overview Presented by Maxwell Drew and Dan Kaiser Southwest State University Computer Science Program.
Embedded System Requirements, Specification and Modelling
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Appendix A Object-Oriented.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Slide 1 UML Review Chapter 2: Introduction to Object-Oriented Systems Analysis and Design with the Unified Modeling Language, Version 2.0 Alan Dennis,
Unified Modeling Language, Version 2.0
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
Behavioral Modeling Chapter 8.
IT 21103/41103 System Analysis & Design. Chapter 05 Object Modeling.
© 2005 Prentice Hall9-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
Fall 2010 CS4310 Requirements Engineering A Brief Review of UML & OO Dr. Guoqiang Hu Department of Computer Science UTEP 1.
An Introduction to the Unified Modeling Language
Basic OOP Concepts and Terms. In this class, we will cover: Objects and examples of different object types Classes and how they relate to objects Object.
Embedded System Spring, 2011 Lecture 2: FORMALISMS FOR SYSTEM DESIGN Eng. Wazen M. Shbair.
CIS 112 Exam Review. Exam Content 100 questions valued at 1 point each 100 questions valued at 1 point each 100 points total 100 points total 10 each.
1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
12 Chapter 12: Advanced Topics in Object-Oriented Design Systems Analysis and Design in a Changing World, 3 rd Edition.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
1. Embedded Computing 1.1 Introduction 1.2 Complex system and microprocessors 1.3 Embedded system design process 1.4 Formalisms for system designs 1.5.
1 Unified Modeling Language, Version 2.0 Chapter 2.
OOP Review CS 124.
Chapter 4 Basic Object-Oriented Concepts. Chapter 4 Objectives Class vs. Object Attributes of a class Object relationships Class Methods (Operations)
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
Chapter 5 System Modeling. What is System modeling? System modeling is the process of developing abstract models of a system, with each model presenting.
Object Modeling THETOPPERSWAY.COM. Object Modelling Technique(OMT)  Building a model of an application domain and then adding implementation.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Coming up: Unified Modeling Language Introduction.
Object-Oriented Programming: Inheritance and Polymorphism.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Appendix A Object-Oriented Analysis and Design A.1.
© 2000 Morgan Kaufman Overheads for Computers as Components Introduction zObject-oriented design. zUnified Modeling Language (UML).
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Generalizable Element Namespace Model Element name visibility isSpecification Classifier isRoot Constraint Body Introduction to the Unified Modeling Language.
Basic Characteristics of Object-Oriented Systems
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Systems Analysis and Design With UML 2
Introduction Object-oriented design. Unified Modeling Language (UML).
SNSCT_CSE_PROGRAMMING PARADIGM_CS206
Dynamic Modeling Lecture # 37.
Overheads for Computers as Components, 2nd ed.
Overheads for Computers as Components, 2nd ed.
Presentation transcript:

Introduction zObject-oriented design. zUnified Modeling Language (UML). 1 © 2010 Husam Alzaq Computers as Components

System modeling zNeed languages to describe systems: yuseful across several levels of abstraction; yunderstandable within and between organizations. zBlock diagrams are a start, but don’t cover everything. 2 © 2010 Husam Alzaq Computers as Components

Object-oriented design zObject-oriented (OO) design: A generalization of object-oriented programming. zObject = state + methods. yState provides each object with its own identity. yMethods provide an abstract interface to the object. 3 © 2010 Husam Alzaq Computers as Components

Objects and classes zClass: object type. zClass defines the object’s state elements but state values may change over time. zClass defines the methods used to interact with all objects of that type. yEach object has its own state. 4 © 2010 Husam Alzaq Computers as Components

OO design principles zSome objects will closely correspond to real-world objects. ySome objects may be useful only for description or implementation. zObjects provide interfaces to read/write state, hiding the object’s implementation from the rest of the system. 5 © 2010 Husam Alzaq Computers as Components

UML zDeveloped by Booch et al. zGoals: yobject-oriented; yvisual; yuseful at many levels of abstraction; yusable for all aspects of design. 6 © 2010 Husam Alzaq Computers as Components

UML object d1: Display pixels: array[] of pixels elements menu_items pixels is a 2-D array comment object name class name attributes 7 © 2010 Husam Alzaq Computers as Components

UML class Display pixels elements menu_items mouse_click() draw_box operationsclass name 8 © 2010 Husam Alzaq Computers as Components

The class interface zThe operations provide the abstract interface between the class’s implementation and other classes. zOperations may have arguments, return values. zAn operation can examine and/or modify the object’s state. 9 © 2010 Husam Alzaq Computers as Components

Choose your interface properly zIf the interface is too small/specialized: yobject is hard to use for even one application; yeven harder to reuse. zIf the interface is too large: yclass becomes too cumbersome for designers to understand; yimplementation may be too slow; yspec and implementation are probably buggy. 10 © 2010 Husam Alzaq Computers as Components

Relationships between objects and classes zAssociation: objects communicate but one does not own the other. zAggregation: a complex object is made of several smaller objects. zComposition: aggregation in which owner does not allow access to its components. zGeneralization: define one class in terms of another. 11 © 2010 Husam Alzaq Computers as Components

Class derivation zMay want to define one class in terms of another. yDerived class inherits attributes, operations of base class. Derived_class Base_class UML generalization 12 © 2010 Husam Alzaq Computers as Components

Class derivation example Display pixels elements menu_items pixel() set_pixel() mouse_click() draw_box BW_displayColor_map_display base class derived class 13 © 2010 Husam Alzaq Computers as Components

Multiple inheritance SpeakerDisplay Multimedia_display base classes derived class 14 © 2010 Husam Alzaq Computers as Components

Links and associations zLink: describes relationships between objects. zAssociation: describes relationship between classes. 15 © 2010 Husam Alzaq Computers as Components

Link example zLink defines the contains relationship: message msg = msg1 length = 1102 message msg = msg2 length = 2114 message set count = 2 16 © 2010 Husam Alzaq Computers as Components

Association example message msg: ADPCM_stream length : integer message set count : integer 0..*1 contains # contained messages # containing message sets 17 © 2010 Husam Alzaq Computers as Components

Stereotypes zStereotype: recurring combination of elements in an object or class. zExample: y > 18 © 2010 Husam Alzaq Computers as Components

Behavioral description zSeveral ways to describe behavior: yinternal view; yexternal view. 19 © 2010 Husam Alzaq Computers as Components

State machines ab state state name transition 20 © 2010 Husam Alzaq Computers as Components

Event-driven state machines zBehavioral descriptions are written as event-driven state machines. yMachine changes state when receiving an input. zAn event may come from inside or outside of the system. 21 © 2010 Husam Alzaq Computers as Components

Types of events zSignal: asynchronous event. zCall: synchronized communication. zTimer: activated by time. 22 © 2010 Husam Alzaq Computers as Components

Signal event > mouse_click leftorright: button x, y: position declaration a b mouse_click(x,y,button) event description 23 © 2010 Husam Alzaq Computers as Components

Call event cd draw_box(10,5,3,2,blue) 24 © 2010 Husam Alzaq Computers as Components

Timer event ef tm(time-value) 25 © 2010 Husam Alzaq Computers as Components

Example state machine region found got menu item called menu item found object highlighted start finish mouse_click(x,y,button)/ find_region(region) input/output region = menu/ which_menu(i) call_menu(I) region = drawing/ find_object(objid) highlight(objid) 26 © 2010 Husam Alzaq Computers as Components

Sequence diagram zShows sequence of operations over time. zRelates behaviors of multiple objects. 27 © 2010 Husam Alzaq Computers as Components

Sequence diagram example m: Moused1: Displayu: Menu mouse_click(x,y,button) which_menu(x,y,i) call_menu(i) time 28 © 2010 Husam Alzaq Computers as Components

Summary zObject-oriented design helps us organize a design. zUML is a transportable system design language. yProvides structural and behavioral description primitives. 29 © 2010 Husam Alzaq Computers as Components