Overheads for Computers as Components, 2nd ed.

Slides:



Advertisements
Similar presentations
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
Advertisements

Unified Modeling Language
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Introduction zObject-oriented design. zUnified Modeling Language (UML). 1 © 2010 Husam Alzaq Computers as Components.
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.
Unified Modeling Language(UML) BY
The Unified Modeling Language (UML) Class Diagrams.
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
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
An Introduction to the Unified Modeling Language
Embedded System Spring, 2011 Lecture 2: FORMALISMS FOR SYSTEM DESIGN Eng. Wazen M. Shbair.
Logical view –show classes and objects Process view –models the executables Implementation view –Files, configuration and versions Deployment view –Physical.
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.
Week 04 Object Oriented Analysis and Designing. What is a model? A model is quicker and easier to build A model can be used in simulations, to learn more.
1 Unified Modeling Language, Version 2.0 Chapter 2.
© 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.
Basic Characteristics of Object-Oriented Systems
Slide 1 Unified Modeling Language, Version 2.0 Object-Oriented SAD.
Object-Oriented Programming
Introduction to Object-oriented Programming
CompSci 280 S Introduction to Software Development
Appendix 3 Object-Oriented Analysis and Design
Object-oriented and Structured System Models
ATM OO Design and Implementation Case Study
The Movement To Objects
Evolution of UML.
Main issues: • What do we want to build • How do we write this down
Object-Oriented Analysis and Design
Systems Analysis and Design With UML 2
Unified Modeling Language
Overheads for Computers as Components
Dynamic Modeling of Banking System Case Study - II
Object-Oriented Systems Analysis and Design Using UML
Introduction to Unified Modeling Language (UML)
Systems Analysis and Design With UML 2
University of Central Florida COP 3330 Object Oriented Programming
Object-Oriented Programming
Abstract descriptions of systems whose requirements are being analysed
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
Software Design AITI GP John Paul Vergara.
Introduction Object-oriented design. Unified Modeling Language (UML).
UML: Unified modeling language
Software Architecture & Design Pattern
A tool for presentation of Architecture
A tool for presentation of Architecture
Object-Oriented Analysis
System models October 5, 2005.
Unified Modeling Language
IMAT5205 Systems Analysis and Design
University of Houston-Clear Lake
Introduction to the Unified Modeling Language
Chapter 20 Object-Oriented Analysis and Design
Object oriented analysis and design
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Dynamic Modeling Lecture # 37.
Copyright 2007 Oxford Consulting, Ltd
Overheads for Computers as Components, 2nd ed.
Basic OOP Concepts and Terms
CIS 375 Bruce R. Maxim UM-Dearborn
Appendix A Object-Oriented Analysis and Design
Chapter 4 System Modeling.
Appendix A Object-Oriented Analysis and Design
The Object Model Lecture OO02 Classes as Abstract Data Types
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Presentation transcript:

Overheads for Computers as Components, 2nd ed. Introduction Object-oriented design. Unified Modeling Language (UML). © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. System modeling Need languages to describe systems: useful across several levels of abstraction; understandable within and between organizations. Block diagrams are a start, but don’t cover everything. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Object-oriented design Object-oriented (OO) design: A generalization of object-oriented programming. Object = state + methods. State provides each object with its own identity. Methods provide an abstract interface to the object. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. Objects and classes Class: object type. Class defines the object’s state elements but state values may change over time. Class defines the methods used to interact with all objects of that type. Each object has its own state. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. OO design principles Some objects will closely correspond to real-world objects. Some objects may be useful only for description or implementation. Objects provide interfaces to read/write state, hiding the object’s implementation from the rest of the system. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. UML Developed by Booch et al. Goals: object-oriented; visual; useful at many levels of abstraction; usable for all aspects of design. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. UML object object name class name d1: Display pixels is a 2-D array pixels: array[] of pixels elements menu_items attributes comment © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. UML class Display class name pixels elements menu_items mouse_click() draw_box operations © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. The class interface The operations provide the abstract interface between the class’s implementation and other classes. Operations may have arguments, return values. An operation can examine and/or modify the object’s state. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Choose your interface properly If the interface is too small/specialized: object is hard to use for even one application; even harder to reuse. If the interface is too large: class becomes too cumbersome for designers to understand; implementation may be too slow; spec and implementation are probably buggy. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Relationships between objects and classes Association: objects communicate but one does not own the other. Aggregation: a complex object is made of several smaller objects. Composition: aggregation in which owner does not allow access to its components. Generalization: define one class in terms of another. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. Class derivation May want to define one class in terms of another. Derived class inherits attributes, operations of base class. Derived_class UML generalization Base_class © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Class derivation example Display base class pixels elements menu_items pixel() set_pixel() mouse_click() draw_box derived class BW_display Color_map_display © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. Multiple inheritance base classes Speaker Display Multimedia_display derived class © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Links and associations Link: describes relationships between objects. Association: describes relationship between classes. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. Link example Link defines the contains relationship: message msg = msg1 length = 1102 message set count = 2 message msg = msg2 length = 2114 © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. Association example # contained messages # containing message sets message message set 0..* 1 msg: ADPCM_stream length : integer count : integer contains © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. Stereotypes Stereotype: recurring combination of elements in an object or class. Example: <<foo>> © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Behavioral description Several ways to describe behavior: internal view; external view. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. State machines transition a b state state name © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Event-driven state machines Behavioral descriptions are written as event-driven state machines. Machine changes state when receiving an input. An event may come from inside or outside of the system. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. Types of events Signal: asynchronous event. Call: synchronized communication. Timer: activated by time. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. Signal event <<signal>> mouse_click a leftorright: button x, y: position mouse_click(x,y,button) b declaration event description © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. Call event draw_box(10,5,3,2,blue) c d © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. Timer event tm(time-value) e f © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. Example state machine start finish input/output region = menu/ which_menu(i) mouse_click(x,y,button)/ find_region(region) call_menu(I) region found got menu item called menu item region = drawing/ find_object(objid) highlight(objid) object highlighted found object © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. Sequence diagram Shows sequence of operations over time. Relates behaviors of multiple objects. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Sequence diagram example m: Mouse d1: Display u: Menu mouse_click(x,y,button) which_menu(x,y,i) time call_menu(i) © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.

Overheads for Computers as Components, 2nd ed. Summary Object-oriented design helps us organize a design. UML is a transportable system design language. Provides structural and behavioral description primitives. © 2008 Wayne Wolf Overheads for Computers as Components, 2nd ed.