0% found this document useful (0 votes)
74 views7 pages

Chapter 4 Review

Uploaded by

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

Chapter 4 Review

Uploaded by

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

CHAPTER 4 REVIEW:

OBJECT-ORIENTED SYSTEMS ANALYSIS AND


DESIGN USING UML

 Object-Oriented Analysis and Design


o Works well in situations where
complicated systems are undergoing
continuous maintenance, adaptation,
and design
o Objects, classes are reusable An Example of a UML Class: A Class Is Depicted as a Rectangle
o The Unified Modeling Language (UML) Consisting of the Class Name, Attributes, and Methods (Figure 10.1)

is an industry standard for modeling o Inheritance: When a derived class


object- oriented systems. inherits all the attributes and behaviors
o Reusability: Recycling of program parts of the base class.
should reduce the costs of development o Reduces programming labor by using
in computer- based systems. common objects easily
o Maintaining systems: Making a change o A feature only found in object-oriented
in one object has a minimal impact on systems
other objects.

 Object-Oriented Concepts
o Objects: Persons, places, or things that
are relevant to the system being
analyzed.
o May be customers, items, orders, and so
on.
o May be GUI displays or text areas on a
display.

o Classes: Defines the set of shared


attributes and behaviors found in each
object in the class
o Should have a name that differentiates it
from all other classes.
o Instantiate is when an object is created  CRC Cards and Object Think
from a class. o CRC
o An attribute describes some property o Class, Responsibilities, Collaborators
that is possessed by all objects of the o CRC cards are used to represent the
class. responsibilities of classes and the
o A method is an action that can be interaction between the classes.
requested from any object of the class.
 Interacting during a CRC Session
o Identify all the classes you can.
o Create scenarios.
o Identify and refine responsibilities.
 The Unified Modeling Language (UML) o Use case diagram: Describing how the
Concepts and Diagrams system is used, The starting point for
o Things UML modeling
o Relationships o Use case scenario: A verbal articulation
o Diagrams of exceptions to the main behavior
described by the primary use case
 Things o Activity diagram: Illustrates the overall
o Structural things are Classes, interfaces, flow of activities
use cases, and other elements that o Sequence diagrams: Show the sequence
provide a way to create models of activities and class relationships.
o They allow the user to describe o Class diagrams: Show classes and
relationships relationships.
o Classes, Interfaces, Collaborations, Use o Statechart diagrams: Show the state
Cases, Active Classes. Components, transitions.
Nodes
o Behavioral things: Describe how things
work, basically, Interactions and state
machines
o Group things: Used to define boundaries
and packagaes
o Annotational things: Can add notes to
the diagrams

 Relationships
o Structural relationships: Tie things
together in structural diagrams
o Dependencies, Aggregations,
Associations, Generalizations
o Behavioral relationships: Used in  Use Case Modeling
behavioral diagrams o Describes what the system does, without
o Communicates, Includes, Extends, describing how the system does it
Generalizes o Based on the interactions and
relationships of individual use cases
 Diagrams o Use case describes Actor, Event, Use
o Structural diagrams: Used to describe case
the relation between classes
o Class diagrams, Object diagrams,
Component diagrams, Deployment
diagrams
o Behavior diagrams: Used to describe the
interaction between people (actors) and
a use case (how the actors use the
system)
o Use case diagrams, Sequence diagrams,
Collaboration diagrams, Statechart
diagrams, Activity diagrams

 Commonly Used UML Diagrams


o A Use Case Scenario is divided into 3
sections: Identification and Initiation,
Steps Performed, and Conditions,
Assumptions, and Questions

 Activity Diagrams
o Show the sequence of activities in a
o Activity diagrams may be used to
process, including sequential and
construct test plans.
parallel activities, and decisions that are
o Each event must be tested to see if the
made.
system goes to the next state.
o Symbols: Rectangle with rounded ends,
o Each decision must be tested.
Arrow, Diamond, Long, flat rectangle,
Filled-in circle, Black circle surrounded
 Activity Diagrams Not Created for All Use
by a white circle, Swimlanes
Cases
o Use an activity diagram when:
o It helps to understand the activities of a
use case
o The flow of control is complex
o

 Creating Activity Diagrams


o Created by asking what happens first There is a need to model workflow
what happens second, and so on
o Must determine what activities are done
in sequence or in parallel o When all scenarios for a use case need
o The sequence of activities can be to be shown
determined from physical data flow
diagrams.  Sequence Diagram
o Can be created by examining all the o Illustrate a succession of interactions
scenarios for a use case between classes or object instances over
time
 Swimlanes o Often used to show the processing
o Useful to show how the data must be described in use case scenarios
transmitted or converted o Used to show the overall pattern of the
o Help to divide up the tasks in a team activities or interactions in a use case
o Makes the activity diagram one that
people want to use to communicate with
others
 Activity Diagrams and Test Plans
o Including the same method (or
operation) several times in a class
o 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.

 Types of Classes
o Entity classes
o Interface classes
o Abstract classes
o Control classes

 Entity Classes
o Represent real-world items
o The entities represented on an entity-
relationship diagram
 Communication Diagram
o Describes the interactions of two or  Interface or Boundary Classes
more things in the system that perform a o Provide a means for users to work with
behavior that is more than any one of the the system.
things can do alone o Human interfaces may be a display,
o Shows the same information as a window, Web form, dialogue box, touch-
sequence diagram, but may be more tone telephone, or other way for users to
difficult to read interact with the system.
o Emphasizes the organization of objects o System interfaces involve sending data
o Made up of objects, communication to or receiving data from others.
links, and the messages that can be
passed along those links
o Communication diagrams show the
same information that is depicted in a
sequence diagram but emphasize the  Abstract Classes
organization of objects rather than the o Linked to concrete classes in a
time ordering. generalization/specialization
relationship
o Cannot be directly instantiated

 Class Diagrams  Control Classes


o Show the static features of the system o Used to control the flow of activities
and do not represent any particular o Many small control classes can be used
processing. to achieve classes that are reusable.
o Show the nature of the relationships
between classes.  Presentation, Business, and Persistence Layers
o Show data storage requirements as well o Sequence diagrams may be discussed
as processing requirements. using three layers:
o Classes o Presentation layer, what the user sees,
o Attributes: Private, Public, Protected corresponding to the interface or
o Methods: Standard, Custom boundary classes.
o Business layer, containing the unique
 Method Overloading rules for this application, corresponding
roughly to control
classes.  Associations
o Persistence or data access layer, for o The simplest type of relationship
obtaining and storing data, o Association classes are those that are
corresponding to the entity classes. used to break up a many-to-many
association between classes.
 Defining Messages and Methods o An object in a class may have a
o Each message may be defined using a relationship to other objects in the same
notation similar to that described for the class, called a reflexive association.
data dictionary.
o The methods may have logic defined  Whole/Part Relationships
using structured English, a decision o When one class represents the whole
table, or a decision tree. object, and other classes represent parts
o Categories
 Create Sequence Diagrams o Aggregation
o Include the actor from the use case o Collection
diagram. o Composition
o
 Aggregation
o A “has a” relationship
o Provides a means of showing that the
o whole object is composed of the sum of
its parts
 Collection
o Consists of a whole and its members
o Members may change, but the whole
Define one or more interface classes for retains its identity
each actor. o A weak association
o Each use case should have one control
class.  Composition
o Examine the use case to see what entity o The whole has a responsibility for the
classes are required. parts, and is a stronger relationship.
o The sequence diagram may be modified o If the whole is deleted, all parts are
when doing detailed design. deleted.

 Creating a Test Plan from a Sequence Diagram  Generalization/Specialization Diagrams


o Does each method return correct results? o Generalization
o Ensure that entity classes store or obtain o Inheritance
the correct attribute values. o Polymorphism
o Verify that all JavaScript paths work o Abstract classes
correctly. o Messages
o Ensure that the server control classes
work correctly.  Generalization
o Ask, “What may fail?” o Describes a relationship between a
o Determine what to do if something can general kind of thing and a more
fail. specific kind of thing
o Described as an “is a” relationship
 Relationships o Used for modeling class inheritance and
o The connections between classes specialization
o Associations o General class is a parent, base, or
o Whole/part superclass
o Specialized class is a child, derived, or  Statechart Diagrams
subclass o Used to examine the different states that
an object may have
 Inheritance o Created for a single class
o Helps to foster reuse o Objects are created, go through changes,
o Helps to maintain existing program code and are deleted or removed.
o Objects
 Polymorphism o States
o The capability of an object-oriented o Events
program to have several versions of the o Signals or asynchronous messages
same method with the same name within o Synchronous
a superclass/subclass relationship o Temporal events
o The subclass method overrides the
superclass method.
o When attributes or methods are defined
more than once, the most specific one is
used.  Statechart Diagrams:
o Created when:
o A class has a complex life cycle.
 Abstract Classes o An instance of a class may update its
o Abstract classes are general classes. attributes in a number of ways through
o No direct objects or class instances, and the life cycle.
is only used in conjunction with o A class has an operational life cycle.
specialized classes o Two classes depend on each other.
o Usually have attributes and may have a o The object’s current behavior depends
few methods on what happened previously.

 Finding Classes  Packages


o During interviewing or JAD sessions o Containers for other UML things
o During facilitated team sessions o Show system partitioning
o During brainstorming sessions o Can be component packages
o Analyzing documents and memos o Can be physical subsystems
o Examining use cases, looking for nouns o Use a folder symbol
o May have relationships
 Determining Class Methods
o Standard methods  Putting UML to Work
o Examine a CRUD matrix o The steps used in UML are:
o Define the use case model.
 Messages o Continue UML diagramming to model
o Used to send information by an object in the system during the systems analysis
one class to an object in another class phase.
o Acts as a command, telling the receiving o Develop the class diagrams.
class to do something o Draw statechart diagrams.
o Consists of the name of the method in o Begin systems design by refining the
the receiving class, as well as the UML diagrams.
attributes that are passed with the o Document your system design in detail.
method name
o May be thought of as an output or an  Summary
input o Object-oriented systems
o Objects
o Classes
o Inheritance

o CRC cards

o UML and use case modeling


o Components of UML
o Things
o Relationships
o Diagrams

o UML diagrams

o Use case diagrams

o Activity diagrams
o Sequence diagrams
o Communication diagrams
o Class diagrams
o Statechart diagrams

o Using UML

You might also like