0% found this document useful (0 votes)
24 views

Object-Oriented Systems Analysis and Design Using UML

Uploaded by

dabashali123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Object-Oriented Systems Analysis and Design Using UML

Uploaded by

dabashali123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

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
Class Diagrams

•Show the static features of the system and do


not represent any particular processing
•Show the nature of the relationships between
classes
•Show data storage requirements as well as
processing requirements

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Class Diagrams (continued)

•Classes
•Attributes
–Private
–Public
–Protected
•Methods
–Standard
–Custom

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.13 A Class Diagram for Course Offerings: The
Filled-In Diamonds Show Aggregation and the Empty
Diamond Shows a Whole-Part Relationship

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

•Including the same method (or operation) several


times in a class
•The same method may be defined more than
once in a given class, as long as the parameters
sent as part of the message are different

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

•Entity classes
•Interface classes
•Abstract classes
•Control classes

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

•Represent real-world items


•The entities represented on an entity-relationship
diagram

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

•Provide a means for users to work with the


system
•Human interfaces may be a display, window,
Web form, dialogue box, touch-tone telephone,
or other way for users to interact with the system
•System interfaces involve sending data to or
receiving data from others

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

•Linked to concrete classes in a


generalization/specialization relationship
•Cannot be directly instantiated

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

•Used to control the flow of activities


•Many small control classes can be used to
achieve classes that are reusable

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Presentation, Business, and
Persistence Layers
•Sequence diagrams may be discussed using
three layers:
–Presentation layer, what the user sees, corresponding
to the interface or boundary classes
–Business layer, containing the unique rules for this
application, corresponding roughly to control classes
–Persistence or data access layer, for obtaining and
storing data, corresponding to the entity classes

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Defining Messages and Methods

•Each message may be defined using a notation


similar to that described for the data dictionary
•The methods may have logic defined using
structured English, a decision table, or a decision
tree

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.15 A Sequence Diagram for Using Two Web
Pages: One for Student Information, One for Course
Information

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

•Include the actor from the use case diagram


•Define one or more interface classes for each
actor
•Each use case should have one control class
•Examine the use case to see what entity classes
are required
•The sequence diagram may be modified when
doing detailed design

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

•The connections between classes


–Associations
–Whole/part

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.18 An Example of an Associative Class in Which
a Particular Section Defines the Relationship between a
Student and a Course

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

•The simplest type of relationship


•Association classes are those that are used to
break up a many-to-many association between
classes
•An object in a class may have a relationship to
other objects in the same class, called a reflexive
association

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

•When one class represents the whole object, and


other classes represent parts
•Categories
–Aggregation
–Collection
–Composition

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

•A “has a” relationship
•Provides a means of showing that the whole
object is composed of the sum of its parts

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

•Consists of a whole and its members


•Members may change, but the whole retains its
identity

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

•The whole has a responsibility for the parts, and


is a stronger relationship
•If the whole is deleted, all parts are deleted

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.19 An Example of Whole-Part
and Aggregation Relationships

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Generalization/Specialization
Diagrams
•Generalization
•Inheritance
•Polymorphism
•Abstract classes
•Messages

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Generalization
• Describes a relationship between a general kind of thing
and a more specific kind of thing
• Described as an “is a” relationship
• Used for modeling class inheritance and specialization
• General class is a parent, base, or superclass
• Specialized class is a child, derived, or subclass

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

•Helps to foster reuse


•Helps to maintain existing program code

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

•The capability of an object-oriented program to


have several versions of the same method with
the same name within a superclass/subclass
relationship
•The subclass method overrides the superclass
method
•When attributes or methods are defined more
than once, the most specific one is used

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

•Abstract classes are general classes


•No direct objects or class instances, and is only
used in conjunction with specialized classes
•Usually have attributes and may have a few
methods

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.20 A Generalization/Specification Diagram
Is a Refined Form of a
Class Diagram

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

•During interviewing
•During facilitated team sessions
•During brainstorming sessions
•Analyzing documents and memos
•Examining use cases, looking for nouns

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

•Standard methods
•Examine a CRUD matrix

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

•Used to send information by an object in one


class to an object in another class
•Acts as a command, telling the receiving class to
do something
•Consists of the name of the method in the
receiving class, as well as the attributes that are
passed with the method name

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

• Used to examine the different states that an object may


have
• Created for a single class
– Objects are created, go through changes, and are deleted or
removed
• Objects
• States
• Events
– Signals or asynchronous messages
– Synchronous
– Temporal events

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Statechart Diagrams (continued)

•Created when:
–A class has a complex life cycle
–An instance of a class may update its attributes in a
number of ways through the life cycle
–A class has an operational life cycle
–Two classes depend on each other
–The object’s current behavior depends on what
happened previously

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.22 A Statechart Diagram Showing How a
Student Progresses from a Potential Student to a
Graduated Student

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

•Containers for other UML things


•Show system partitioning
•Can be component packages
•Can be physical subsystems
•Use a folder symbol
•May have relationships

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Figure 10.23 Use Cases Can Be
Grouped into Packages

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Putting UML to Work

The steps used in UML are:


–Define the use case model
–Continue UML diagramming to model the system
during the systems analysis phase
–Develop the class diagrams
–Draw statechart diagrams
–Begin systems design by refining the UML diagrams
–Document your system design in detail

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

•Object-oriented systems
–Objects
–Classes
–Inheritance
•CRC cards
•UML and use case modeling
•Components of UML
–Things
–Relationships
–Diagrams

Copyright © 2019, 2014, 2011 Pearson Education, Inc. All Rights Reserved
Summary (continued)

•UML diagrams
–Use case diagrams
–Activity diagrams
–Sequence diagrams
–Communication diagrams
–Class diagrams
–Statechart diagrams
•Using UML

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