Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
1/06 OOAD 1
Chapter 2: Introduction to Object-Oriented Systems Analysis and Design
1/06 OOAD 2
Objectives
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.Understand a minimalist approach to object-oriented systems analysis and design.
1/06 OOAD 3
Basic Characteristics of Object Oriented Systems
Classes and ObjectsMethods and MessagesEncapsulation and Information HidingInheritancePolymorphism and Dynamic Binding
1/06 OOAD 4
Classes and Objects
Object-oriented approach uses self-contained modules called objects (containing both data and processes) as the building blocks for developing a system.An object is a thing, both tangible and intangible. Account, Vehicle, Employee, etc.
1/06 OOAD 5
Classes and Objects (Cont.)
To create an object inside the computer program, we must provide a definition for objects—how they behave and what kinds of information they maintain —called a class.
1/06 OOAD 6
Classes and Objects
Class – Template to define specific instances or objectsObject – Instantiation of a class (i.e. an instance of a class)Attributes – Describes the objectBehaviors – specify what object can do
1/06 OOAD 7
Classes and Objects
1/06 OOAD 8
Methods and Messages
Methods implement an object’s behaviorAnalogous to a function or procedure
Messages are sent to trigger methodsProcedure call from one object to the next
1/06 OOAD 9
Messages and Methods
1/06 OOAD 10
Sending a Message
deposit 250.00
Message deposit with the argument 250.00 is sent to a BankAccountobject SV198.
Message deposit with the argument 250.00 is sent to a BankAccountobject SV198.
SV198 : BankAccount
1/06 OOAD 11
Sending a Message and Getting an Answer
current balance
getCurrentBalance()
Ask for the current balance of this particular account.
Ask for the current balance of this particular account.
SV198 : BankAccount
The current balance of SV198 is returned.
The current balance of SV198 is returned.
1/06 OOAD 12
Calling a Class Method
maximum speed
MobileRobot
getMaximumSpeed()
Ask for the maximum possible speed for all MobileRobot objects is returned.
Ask for the maximum possible speed for all MobileRobot objects is returned.
1/06 OOAD 13
Encapsulation and Information Hiding
Encapsulation combination of data and process into an entity
Information HidingOnly the information required to use a software module is published to the user
Reusability KeyUse an object by calling methods
1/06 OOAD 14
Inheritance
Superclasses or general classes are at the top of a hierarchy of classesSubclasses or specific classes are at the bottomSubclasses inherit attributes and methods from classes higher in the hierarchy
1/06 OOAD 15
Inheritance
Inheritance is a mechanism in OOP to design two or more entities that are different but share many common features.
Features common to all classes are defined in the superclass.The classes that inherit common features from the superclass are called subclasses.
We also call the superclass an ancestor and the subclass a descendant.
1/06 OOAD 16
Class Hierarchy
1/06 OOAD 17
Inheritance
1/06 OOAD 18
Polymorphism and Dynamic Binding
PolymorphismA message can be interpreted differently by different classes of objects
Dynamic BindingSometimes called late bindingDelays typing or choosing a method for an object until run-time
Static BindingType of object determined at compile time
1/06 OOAD 19
Polymorphish & Encapsulation
1/06 OOAD 20
The Unified Modeling Language, Version 2.0
Structure DiagramsBehavior DiagramsExtension MechanismsDevelopers
Grady BoochIvar JacobsonJames Rumbaugh
1/06 OOAD 21
Structure Diagram
Structure Diagrams includeClassObjectpackageDeploymentComponentComposite structure diagrams
1/06 OOAD 22
Structure Diagrams
Classrelationship between classes
ObjectRelationships between objects
PackageGroup UML elements together to form higher level constructs
1/06 OOAD 23
Structure Diagrams Cont.
DeploymentShows the physical architecture and software components of system
ComponentPhysical relationships among software components
Composite StructureIllustrates internal structure of a class
1/06 OOAD 24
Behavior Diagrams
ActivityIllustrates business workflows
SequenceTime-based ordering Behavior of objects activities in a use case
CommunicationCommunication among a set of collaborating objects of an activity
Interaction Overview TimingOverview of flow of control of a process
1/06 OOAD 25
State Machines
Behavioral State MachineExamines behavior of one class
Protocol State MachineShows dependencies of different interfaces of a class
Use-CaseCaptures business requirementsIllustrates interaction between system and environment
1/06 OOAD 26
Use Case Diagrams
Captures Business requirementsIllustrates interaction between a system and its environment
Includes end userAny external system that interacts with its information system
Documents and clarifies requirements of system being modeled
1/06 OOAD 27
Extension Mechanisms
StereotypesGives ability to incrementally extend UML
Tagged ValuesAdd new properties to base elements
ConstraintsPlace restrictions on use of model elements
ProfilesGroup model elements into a package
1/06 OOAD 28
Object-Oriented Development Approaches
• Use-case driven• Architecture Centric
• Functional view, static view, and dynamic view.
• Iterative and Incremental
1/06 OOAD 29
Benefits of the Object Approach
1/06 OOAD 30
The Unified Process
1/06 OOAD 31
Supporting Workflows
1/06 OOAD 32
A Minimalist Approach
Benefits of Object-Oriented Systems Analysis and DesignExtensions of the Unified ProcessThe Minimalist Object-Oriented Systems Analysis and Design Approach
1/06 OOAD 33
MOOSAD Approach
1/06 OOAD 34
Summary
Basic characteristics of an object oriented systemUnified modeling LanguageUnified modeling systemObject oriented Systems Analysis and DesignMinimalist approach to Object oriented systems analysis and design with UML