0% found this document useful (0 votes)
222 views44 pages

Object-Oriented Systems Analysis and Design Using UML

hth

Uploaded by

dabashali123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
222 views44 pages

Object-Oriented Systems Analysis and Design Using UML

hth

Uploaded by

dabashali123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Systems Analysis & Design

Tenth Edition

Chapter 10
Object-Oriented

Systems
Analysis and
Design Using
UML
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Learning Objectives (1 of 2)

• Understand what object-oriented systems


analysis and design is and appreciate its
usefulness
• Comprehend the concepts of Unified Modeling
Language (UML), the standard approach for
modeling a system in the object-oriented world
• Apply the steps used in UML to break down the
system into a use case model and then a class
model

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Learning Objectives (2 of 2)

• Diagram systems with the UML toolset so they


can be described and properly designed
• Document and communicate the newly modeled
object-oriented system to users and other
analysts

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Object-Oriented Analysis and
Design
• Works well in situations where complicated
systems are undergoing continuous
maintenance, adaptation, and design
• Objects, classes are reusable
• The Unified Modeling Language (UML) is an
industry standard for modeling object-oriented
systems.

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Object-Oriented Analysis and
Design (continued)
• Reusability
– Recycling of program parts should reduce the costs of
development in computer-based systems
• Maintaining systems
– Making a change in one object has a minimal impact
on other objects

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Major Topics

• Object-oriented concepts
• CRC cards and object think
• Unified Modeling Language
• Use case and other UML diagrams
• Packages
• Using UML

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Object-Oriented Concepts

• Objects
• Classes
• Inheritance

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Objects

• Persons, places, or things that are relevant to the


system being analyzed
• May be customers, items, orders, and so on
• May be GUI displays or text areas on a display

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Classes

• Defines the set of shared attributes and


behaviors found in each object in the class
• Should have a name that differentiates it from all
other classes
• Instantiate is when an object is created from a
class
• An attribute describes some property that is
possessed by all objects of the class
• A method is an action that can be requested from
any object of the class

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.1 An Example of a UML
Class:

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Inheritance

• When a derived class inherits all the attributes


and behaviors of the base class
• Reduces programming labor by using common
objects easily
• A feature only found in object-oriented systems

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.2 A Class Diagram Showing
Inheritance

Car and truck are specific examples of


vehicles and inherit the characteristics
of the more general class vehicle.

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
CRC Cards and Object Think

• CRC
– Class
– Responsibilities
– Collaborators
• CRC cards are used to represent the
responsibilities of classes and the interaction
between the classes

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.3 Four CRC Cards

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Interacting during a CRC Session

• Identify all the classes you can


• Create scenarios
• Identify and refine responsibilities

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
The Unified Modeling Language
(UML) Concepts and Diagrams
• Things
• Relationships
• Diagrams

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.4 An Overall View of UML and Its Components:
Things, Relationships, and Diagrams

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Things
• Structural things are:
– Classes, interfaces, use cases, and other elements that provide
a way to create models
– They allow the user to describe relationships
• Behavioral things
• Describe how things work
– Interactions and state machines
• Group things
– Used to define boundaries
• Annotational things
– Can add notes to the diagrams

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Relationships

• Structural relationships
– Tie things together in structural diagrams
• Behavioral relationships
– Used in behavioral diagrams

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Structural Relationships

• Dependencies
• Aggregations
• Associations
• Generalizations

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Behavioral Relationships

• Communicates
• Includes
• Extends
• Generalizes

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Diagrams

• Structural diagrams
– Used to describe the relation between classes
• Behavioral diagrams
– Used to describe the interaction between people
(actors) and a use case (how the actors use the
system)

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Structural Diagrams

• Class diagrams
• Object diagrams
• Component diagrams
• Deployment diagrams

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Behavioral Diagrams

• Use case diagrams


• Sequence diagrams
• Collaboration or communication diagrams
• Statechart diagrams
• Activity diagrams

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Commonly Used UML Diagrams

• Use case diagram


– Describing how the system is used
– The starting point for UML modeling
• Use case scenario
– A verbal articulation of exceptions to the main
behavior described by the primary use case
• Activity diagram
– Illustrates the overall flow of activities

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Commonly Used UML Diagrams
(continued)
• Sequence diagrams
– Show the sequence of activities and class
relationships
• Class diagrams
– Show classes and relationships
• Statechart diagrams
– Show the state transitions

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.5 An Overview of UML Diagrams Showing How
Each Diagram Leads to the Development of Other UML
Diagrams

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Use Case Modeling

• Describes what the system does, without


describing how the system does it
• Based on the interactions and relationships of
individual use cases
• Use case describes
– Actor
– Event
– Use case

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.6 A Use Case Example of
Student Enrollment

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.7 A Use Case Scenario Is Divided into Three
Sections: Identification and Initiation, Steps Performed,
and Conditions, Assumptions, and Questions

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Activity Diagrams

• Show the sequence of activities in a process,


including sequential and parallel activities, and
decisions that are made
• Symbols
– Rectangle with rounded ends
– Arrow
– Diamond
– Long, flat rectangle
– Filled-in circle
– Black circle surrounded by a white circle
– Swimlanes

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.8 Specialized Symbols Are Used
to Draw an Activity Diagram

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Creating Activity Diagrams

• Created by asking what happens first, what


happens second, and so on
• Must determine what activities are done in
sequence or in parallel
• The sequence of activities can be determined
from physical data flow diagrams
• Can be created by examining all the scenarios
for a use case

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Swimlanes

• Useful to show how the data must be transmitted


or converted
• Help to divide up the tasks in a team
• Makes the activity diagram one that people want
to use to communicate with others

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.9 This Activity Diagram Shows Three
Swimlanes: Client Web Page, Web Server, and Mainframe

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Activity Diagrams and Test Plans

• Activity diagrams may be used to construct test


plans
• Each event must be tested to see if the system
goes to the next state
• Each decision must be tested

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Activity Diagrams Not Created for
All Use Cases
• Use an activity diagram when:
– It helps to understand the activities of a use case
– The flow of control is complex
– There is a need to model workflow
– When all scenarios for a use case need to be shown

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Sequence Diagrams

• Illustrate a succession of interactions between


classes or object instances over time
• Often used to show the processing described in
use case scenarios
• Used to show the overall pattern of the activities
or interactions in a use case

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
• object Name: A name with a colon after it
represents an object.
• :class A colon with a name after it
represents a class.
• objectName:class A name, followed by a
colon and another name, represents an
object in a class.

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.10 Specialized Symbols Used
to Draw a Sequence Diagram

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.11 A Sequence Diagram for Student Admission:
Sequence Diagrams Emphasize the Time Ordering of
Messages

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Communication Diagrams

• Describes the interactions of two or more things


in the system that perform a behavior that is
more than any one of the things can do alone
• Shows the same information as a sequence
diagram, but may be more difficult to read
• Emphasizes the organization of objects
• Made up of objects, communication links, and
the messages that can be passed along those
links

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.12 A Communication Diagram for
Student Admission

Communication diagrams show the same information that is depicted in a sequence


diagram but emphasize the organization of objects rather than the time ordering.

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Copyright

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved

You might also like