Transcript UML 10.ppt

Software Engineering
- Mr. Ahmad Al-Ghoul
Chapter Objectives


Explain how object-oriented
analysis can be used to describe
an information system
Define object modeling terms and
concepts, including objects,
instances, attributes, methods,
messages, and classes
2
Introduction


Object-oriented (O-O) analysis describes an
information system by identifying things called
objects. Object-oriented analysis is a popular
approach that sees a system from the viewpoint
of the objects themselves as they function and
interact with the system.
Although traditional structured analysis is the
most popular approach, the use of objectoriented analysis and design is growing rapidly
3
Object-Oriented analysis and
design using UML


The Unified Modeling Language (UML) is
used to describe the system concept as a
collection of objects incorporating both
data and processes
UML is just a standard diagramming
notation. It is just a tool, not a skill that is
valuable in itself.
4
Object-Oriented analysis and
design using UML

The UML combines the best of the best from






Data Modelling concepts (Entity Relationship Diagrams)
Business Modelling (work flow)
Object Modelling
Component Modelling
The UML is the standard language for visualizing,
specifying, constructing, and documenting the artefacts
of a software-intensive system
It can be used with all processes, throughout the
development life cycle, and across different
implementation technologies
5
Object-Oriented analysis and
design using UML

The UML may be used to:





Display the boundary of a system & its major functions using use
cases and actors
Illustrate use case realizations with interaction diagrams
Represent a static structure of a system using class diagrams
Model the behaviour of objects with state transition diagrams
Reveal the physical implementation architecture with component
& deployment diagrams
6
Object-Oriented analysis and
design using UML

Object-Oriented Terms and Concepts

Object model

An object model describes objects, which combine
data and processes. Object models are the end
product of object-oriented analysis.
7
Object-Oriented analysis and
design using UML

Object-Oriented Terms and Concepts






Objects
Instances
Attributes
Methods
Messages
Classes
8
Object-Oriented analysis and
design using UML

Objects and Instances







An object represents a real person, place, event, or transaction
that are relevant to the system we are analyzing.
An object includes data and the processes that affect that data
An object has certain attributes, which are characteristics that
describe the object.
An object has methods, which are tasks or functions that the
object performs when it receives a message, or command.
A group of similar objects are called class
The UML represents an object as a rectangle with the object
name at top, followed by the object’s attributes and methods
An instance is a specific member of an object or a class
9
Object-Oriented analysis and
design using UML

Attributes



If objects are similar to nouns, attributes are
similar to adjectives that describe the
characteristics of an object
Number of attributes depends on the business
requirements of the information system and
its users
Systems analysts define an object’s attributes
during the system design process
10
Object-Oriented analysis and
design using UML

Methods


A method defines specific tasks that an object
can perform
Just as objects are similar to nouns and
attributes are similar to adjectives, methods
resemble verbs that describe what and how
an object does something
11
Object-Oriented analysis and
design using UML [1]
The PARENT object
includes five attributes and
three methods.
The CHILD object includes
four attributes and five
methods
The DOG object includes six
attributes and four methods.
12
Object-Oriented analysis and
design using UML

Messages


A message is a command that tells an object
or class to perform a creation method
Polymorphism: The concept that a message
gives different meanings to different objects
depend on the methods
13
Object-Oriented analysis and design using UML [1]
the ADD STUDENT method requires
the STUDENT object to perform
nine specific steps.
The message ADD STUDENT signals the
STUDENT class to perform the ADD
STUDENT method
14
Object-Oriented analysis and
design using UML [1]
An example of polymorphism, the message GOOD NIGHT
produces different results, depending on which object
receives it.
15
Object-Oriented analysis and
design using UML




You can view an object as a black box, because a
message to the object triggers changes within the object
without specifying how the changes must be carried out.
The black box concept is an example of encapsulation.
Encapsulation means that all data and methods are selfcontained
By limiting access to internal processes, an object
prevents its internal code from being altered by anther
object or process
Encapsulation allows objects to be used as modular
components anywhere in the system, because objects
send and receive messages but do not alter the internal
methods of other objects
16
Object-Oriented analysis and
design using UML

Classes




An object belongs to a group or category called a
class that is optimal for reuse and maintainability
All objects within a class share common attributes
and methods
Objects within a class can grouped into subclass ,
which are more specific categories within a class
A class can belong to a more general category called
a superclass
17
Object-Oriented analysis and
design using UML [1]
the PERSON superclass includes common attributes and methods. EMPLOYEE
is a class within the PERSON superclass. INSTRUCTOR is a subclass within
the EMPLOYEE class.
18
Sequence Summary





The unified modeling language (UML) is a widely used
method of visualizing and documenting an information system
UML is just a standard diagramming notation. It is just a tool,
not a skill that is valuable in itself.
An object represents a real person, place, event, or
transaction that are relevant to the system we are analyzing.
An object includes data and the processes that affect that
data
Object oriented terms include classes, attributes, instance,
messages, and methods




Classes include objects that have similar attributes, or
characteristics
Individual members of a class are called object instances
Objects can send massages, or commands, that require other
objects to perform certain methods
A method defines specific tasks that an object can perform
19
Sequence Summary

In this Sequence we have
 Defined and explained object oriented
analysis
 Defined and explained the unified
modeling language (UML)
 Defined and explained object oriented
terms includes objects, classes, attributes,
instance, messages, and methods
20
Reference
[1] System Analysis and Design, Sixth Edition
Authors: Gary B. Shelly, Thomas J. Cashman and Harry J. Rosenblatt
Publisher: SHELLY CASHMAN SEWIES.
[2] system analysis and design, sixth edition
Authors: Kenneth E. Kendall and Julie E. Kendall
Publisher: Prentice Hall
[3] Modern Systems Analysis and Design Third Edition
Authors: Jeffrey A. Hoffer , Joey F. George, Joseph S. Valacich
Publisher: prentice hall
21