Sei sulla pagina 1di 27

THE MOVEMENT TO OBJECTS

Systems Analysis and Design with UML 2.0, Third Edition

Objective
Understand the basic characteristics of object-oriented systems Be familiar with the Unified Modeling Language (UML) Version 2.0 Be familiar with the Unified Process

Basic Characteristics of Object-Oriented Systems


Classes and Objects Methods and Messages Encapsulation and Information Hiding Inheritance Polymorphism and Dynamic Binding

Basic Characteristics of Object Oriented Systems (Cont.)


An Object is a thing (person, place, etc) which we want to capture information An Object has attributes that describe information about the object Objects are grouped into classes (collections of objects that share common attributes and methods)

Basic Characteristics of Object Oriented Systems (Cont.)


Hierarchy of classes helps reducing redundancy in development An Object has behaviors which are described by methods that specify what an object can do Objects communicate by sending messages which trigger methods

Classes and Objects


Class Template to define specific instances or objects Object Initiation of a class Attributes Describe the object Behaviors Specify what can object do

Classes and Objects (Cont.)

Methods and Messages


Methods implement an object behavior
Analogous to a function or procedure

Messages are sent to trigger methods


Procedure call from one object to the next

Methods and Messages

Encapsulation and Information Hiding


Encapsulation combination of data and process into entity Information Hiding only the information

required to use a software module is published to


user

Reusability Key use an object by calling


methods

Inheritance
Superclasses or general classes are at the top of hierarchy of classes Subclasses or specific classes are at the botom Subclasses inherit attributes and methods

from classes higher in the hierarchy

Inheritance (Cont.)

Inheritance (Cont.)

Polymorphism and Dynamic Binding


Polymorphism
a message can be interpreted differently by different classes of objects

Dynamic Binding
Sometimes call late binding

Delays typing or choosing a method for an object until


run-time

Polymorphism and Encapsulation (Cont.)

Object-Oriented System Analysis and Design


Use-case driven Architecture Centric Iterative and Incremental The Unified Process

Before the UML


Evolution of OO Development Methods
1960s 1970s
COBOL, FORTRAN, C Structured Analysis and Design Techniques

1980s early 1990s


Smalltalk, Ada, C++, Visual Basic Early generation OO methods

Mid/ Late 1990s


Java UML Unified Process

UML Version 2.0


Broken into two major groupings

Structure Diagrams
Behavioral Diagrams

Developers Grady Booch

Ivar Jacobson
James Rumbaugh

UML 1.4 VS UML 2.0


No. 1 2 3 4 5 6 7 8 9 UML 1.4 Model Element Name Association end Object (when used in activity diagrams) Object (when used in sequence diagrams) Collaboration diagrams Swimlane (or partition) Activity Decision Final State or end state Initial state or start state UML 2.0 Model Element Name Member end and Property Object node Lifeline Communication diagrams ActivityPartition Structured activity node Decision node or merge node Final Activity Node Initial node Central buffer node Structured activity node Structured activity node

10 Object Instance (in activity diagrams) 11 State 12 State machine

Source: http://publib.boulder.ibm.com/infocenter/rtnlhelp/v6r0m0/index.jsp?topic=/com.ibm.xtools.modeler.doc/topics/r_uml_name_diffs.html

UML 1.4 VS UML 2.0 (Cont.)


No. UML 1.4 Model Element Name UML 2.0 Model Element Name Fork node or Join node Control flow Control flow guard Template Parameter Substitution Template Binding Class diagrams Lifeline Message pathway Communication Path Artifact Execution environment Stop node 13 Synchronization bar (synch bar) 14 Transition (on an activity diagram) 15 Transition condition (guard condition) 16 Formal Argument 17 Formal Arguments (collection of Formal Arguments) 18 Three-tiered diagrams 19 Class Instance 20 Self-link 21 Connection relationship 22 Process (in a deployment diagram) 23 Processor 24 Destruction marker

Source: http://publib.boulder.ibm.com/infocenter/rtnlhelp/v6r0m0/index.jsp?topic=/com.ibm.xtools.modeler.doc/topics/r_uml_name_diffs.html

UML 1.4 VS UML 2.0 (Cont.)


No. 26 Action 27 28 29 UML 1.4 Model Element Name UML 2.0 Model Element Name

25 Focus of Control

Execution Occurrence
UML activity Composite Structure Diagram Interaction Overview Diagram Timing Diagram

Source: http://publib.boulder.ibm.com/infocenter/rtnlhelp/v6r0m0/index.jsp?topic=/com.ibm.xtools.modeler.doc/topics/r_uml_name_diffs.html

Structure Diagrams
Class Object Package Deployment Component Composite Structure

Structure Diagrams (Cont.)


Class
Relationships between classes

Object
Relationships between objects

Package
Group UML elements together to form higher level
constructs

Structure Diagram (Cont.)


Deployment
Show the physical architecture and software components of system

Component
Physical relationships among software components

Composite Structure
Illustrates internal structure of class

Behavioral Diagrams
Activity
Illustrates business workflows

Interaction Diagrams
Sequence
Time-based ordering behavior of objects activities in usecase

Communication
Communication among a set of collaborating objects on an activity

Interaction Overview
Overview of flow of control of a process

Timing
Illustrate the interaction and state changes which they go through time

Behavior Diagrams (Cont.)


State Machines
Behavioral State Machine
Examines behavior of one class

Protocol State Machine


Show dependencies of different interfaces of class

Use Case
Captures business requirements
Illustrates interaction between system and environment

Use Case Diagram


Captures business requirements Illustrates interaction between a system and its environment
Includes end user
Any external system that interacts with its information system

Documents and clarifies requirements of system being


modeled

Potrebbero piacerti anche