SlideShare a Scribd company logo
1 of 154
Download to read offline
1
CS8592
OBJECT ORIENTED ANALYSIS AND DESIGN
UNIT I - UNIFIED PROCESS AND USE CASE DIAGRAMS
Introduction to OOAD with OO Basics - Unified Process - UML
diagrams - Use Case - Case study- the Next Gen POS system,
Inception - Use case Modelling - Relating Use cases - include,
extend and generalization - When to use Use-cases.
2
Introduction to OOAD
âš« Why OO?
âš« What is OOAD?
âš« How to do OOAD?
What is an Object?
What is an Object?
What is an Object?
What is an Object?
7
Why Object-Oriented?
8
What is Object?
âš« An "object" is anything to which a concept applies, in our awareness
âš« Things drawn from the problem domain or solution space.
âš« E.g., a living person in the problem domain, a software component in the solution space.
âš« A structure that has identity and properties and behavior
âš« It is an instance of a collective concept, i.e., a class.
9
Encapsulation
Information hiding
Objects encapsulate:
property
behavior as a collection of methods invoked by
messages
…state as a collection of instance variables
Abstraction
Focus on the essential
Omits tremendous amount of details
…Focus on what an object “is and does”
What is Object-Orientation?
- Abstraction and Encapsulation
10
What is Object-Orientation?
- Another Example of Abstraction and Encapsulation
Class Car
Attributes
âť‘ Model
âť‘ Location
âť‘ #Wheels = 4
Operations
âť‘ Start
âť‘ Accelerate
<<instanceOf>>
<<instanceOf>>
<<instanceOf>>
11
What is Object-Orientation?
- Class
âš« What is CLASS?
âš« a collection of objects that share common properties, attributes, behavior and
semantics, in general.
âš« A collection of objects with the same data structure (attributes, state variables)
and behavior (function/code/operations) in the solution space.
âš« Classification
âš« Grouping of common objects into a class
âš« Instantiation.
âš« The act of creating an instance.
Class Car
Attributes
âť‘ Model
âť‘ Location
âť‘ #Wheels = 4
Operations
âť‘ Start
âť‘ Accelerate
<<instanceOf>>
<<instanceOf>>
<<instanceOf>>
12
What is Object-Orientation?
- Subclass vs. Superclass
• Specialization: The act of defining one class as a refinement of another.
• Subclass: A class defined in terms of a specialization of a superclass
using inheritance.
• Superclass: A class serving as a base for inheritance in a class hierarchy
• Inheritance: Automatic duplication of superclass attribute and behavior
definitions in subclass.
Person
name
SSN
Student
std-id
level
Employee
emp-id
age
13
What is Object-Orientation?
- Polymorphism
Objects of different classes respond to the same message differently.
payTuition
Person
name
SSN
Student
std-id
level
Employee
emp-id
In-State
Student
state
payTuition payTuition
Out-of-State
Student
payTuition
14
What is Object-Orientation?
- Interfaces
• Information hiding - all data should be hidden within a class, at least in principle.
• make all data attributes private
• provide public methods to get and set the data values (cf. Java design patterns)
• e.g. Grade information is usually confidential, hence it should be kept
private to the student. Access to the grade information should be
done through interfaces, such as setGrade and getGrade
payTuition
setGrade()
getGrade()
Student
std-id
level
getGrade
setGrade
grade
15
What is Object-Orientation?
-State transition impossible?
tom: Actor
name = “Tom Cruise”
katie: Actor
name = “Katie Holmes”
tom: Actor
name = “Tom Holmes”
katie: Actor
name = “Katie Holmes”
married/changeLastName
tom: Actor
name = “Tom Holmes”
katie: Actor
name = “Katie Holmes”
suri: BabyActor
name = “Suri Holmes”
newArrival/getName
OOA to OOD
17
What is OOAD?
⚫ Analysis — understanding, finding and describing concepts in
the problem domain.
⚫ Design — understanding and defining software solution/objects
that represent the analysis concepts and will eventually be
implemented in code.
⚫ OOAD — Analysis is object-oriented and design is object-
oriented. A software development approach that emphasizes a
logical solution based on objects.
18
Systems Engineering
Requirements Analysis
Project Planning
Architectural Design
Detailed Design
Implementation
Release
Maintenance
Quality
Assurance
Software Lifecycle
How to Do OOAD
– Where to Use OO?
19
Introduction to OOAD
OO Prog. Languages
(Smalltalk, C++)
just program!
OO Design
(Booch) design then
program
OO Analysis
(Rumbaugh, Jacobson)
Process Perspective
OO Technology
Analyze (use case) first,
then design,
T then program
20
Knowledge
Representation (in A.I.)
Psychological Validity
Philosophical Validity
Computational Validity
Databases
Emphasis in Persistent Data
(and now ACID properties)
RelationalDB
Network DB
Hierarchical DB
OODB
Programming Languages
Emphasis in Efficiency
Simula, SmallTalk, C++, Protel,
Java
ERD
SDM
CM
ADT
ERD: Entity Relationship Diagram
SDM: Semantic Data Model
ADT: Abstract Data Type
CM: Conceptual Model
Why Object-Oriented
- Who’s Behind Object-Orientation
System/Software
Engineering
Unified Process
âš« It emphasizes the difference between
engineering and production.
âš« The Unified Process is not simply a
process, but rather an extensible
framework which should be
customized for specific organizations
or projects.
Difference: Engineering vs. Production
âš« Engineering Stage
âš« Driven by less predictable but smaller teams, focusing
on design and synthesis activities
âš« Production Stage
âš« Driven by more predictable but larger teams, focusing
on construction, test and deployment activities
Phases in the Unified Process
âš« The two stages of the Unified Process
are decomposed into four distinct phases
âš« Engineering stage
1. Inception phase
2. Elaboration phase
âš« Production phase
3. Construction phase
4. Transition phase
Elaboration
Inception
Construction
Phases in the Unified Process
Transition
Transition from
engineering stage to
production stage.
Inception Phase
âš« Investigation
âš« Establish the project scope
âš« Identify the critical use cases and
scenarios
âš« Define acceptance criteria
âš« Demonstrate at least one candidate
software architecture
âš« Estimate the cost and schedule for the
project
âš« Define and estimate potential risks
Elaboration Phase
âš« Baseline the software architecture
âš« Establish a configuration management plan
in which all changes are tracked and
maintained
âš« Baseline the problem statement
âš« Baseline the software project
management plan for the construction
phase
âš« Demonstrate that the architecture
supports the requirements at a
reasonable cost in a reasonable time
Construction Phase
âš« Minimize development costs by
optimizing resources
âš« Achieve adequate quality as rapidly as
practical
âš« Achieve useful version (alpha, beta, and
other test releases) as soon as possible
Transition Phase
âš« The transition phase is entered when a
baseline is mature
âš« A usable subset of the system has been built with
acceptable quality levels and user documents
âš« It can be deployed to the user community
âš« For some projects the transition phase means
the starting point for another version of the
software system
âš« For other projects the transition phase means
the complete delivery of the software system to
a third party responsible for operation,
maintenance and enhancement.
Profile of a typical project showing the
relative sizes of the four phases of the
Unified Process.
Relative sizes of the four phases
Diagram illustrating how the relative emphasis of different
disciplines changes over the course of the project
Relative emphasis of different disciplines changes
What is UML?
âš« UUML - Unified Modeling language
âš« UML is a modeling language, not a methodology or process
âš« Developed by Grady Booch, James Rumbaugh and Ivar
Jacobson at Rational Software.
The Unified Modelling Language (UML) is a language for
specifying, visualizing, constructing, and documenting the
artefacts of software systems, as well as for business
modelling and other non-software systems.
UML Models
Use Case
Diagrams
Collaboration
Diagrams
Component
Diagrams
Deployment
Diagrams
Object
Diagrams
Statechart
Diagrams
Sequence
Diagrams
Class
Diagrams
Activity
Diagrams
Models
Object
Diagrams
Object
Diagrams
Static
model
Dynamic
Structural
: element of spec. irrespective of time
• Class
• Component
• Deployment
• Object
• Composite structure
• Package
Behavioral
: behavioral features of a system / business
process
• Activity
• State machine
• Use case
Interaction
: emphasize object interaction
• Communication(collaber
ation)
• Sequence
• Interaction overview
• Timing
UML Diagrams
34
Use cases diagram
âš« Capture the specific ways of using the
system as dialogues between an actor
and the system.
âš« Use cases are used to
âš« Capture system requirements
âš« Communicate with end users and Subject
Matter Experts
âš« Test the system
Use cases diagrams describes the behavior of the target
system from an external point of view. Use cases
describe "the meat" of the actual requirements.
35
Naming Use Cases
âš« Must be a complete process from the
viewpoint of the end user
âš« Usually in verb-object form, like Buy
Pizza
âš« Use enough detail to make it specific
âš« Use active voice, not passive
âš« From viewpoint of the actor, not the
system
36
Use Case Name Examples
âš« Excellent - Purchase Concert Ticket
âš« Very Good - Purchase Concert Tickets
âš« Good - Purchase Ticket (insufficient detail)
âš« Fair - Ticket Purchase (passive)
âš« Poor - Ticket Order (system view, not user)
âš« Unacceptable - Pay for Ticket (procedure,
not process)
37
CRUD
âš« Examples of bad use case names with
the acronym CRUD. (All are procedural
and reveal nothing about the actor’s
intentions.)
âš« C - actor Creates data
âš« R - actor Retrieves data
âš« U - actor Updates data
âš« D - actor Deletes data
38
Actor
âš« An actor is an idealized
user of a system
âš« Actors can be users,
processes, and other
systems
âš« Many users can be one
actor, in a common role
âš« One user can be different
actors, based on different
roles
âš« An actor is labeled with
the name of the role
39
Identify Actors
âš« We cannot understand a system until we
know who will use it
âš« Direct users
âš« Users responsible to operate and maintain it
âš« External systems used by the system
âš« External systems that interact with the
system
40
Non-human Actor
âš« Actors can be users,
processes, and other
systems.
âš« Show non human actors
in a different manner,
usually as a rectangle
âš« Non human actors are
usually not primary users,
and thus are usually
shown on the right, not
the left.
Inventory
System
41
Types of Actors
âš« Primary Actor
âš« Has goals to be fulfilled by system
âš« Supporting Actor
âš« Provides service to the system
âš« Offstage Actor
âš« Interested in the behavior, but no
contribution
âš« In diagrams, Primary actors go on the left and
others on the right.
42
Define Actors
âš« Actors should not be analyzed or described in
detail unless the application domain demands
it.
âš« Template for definition:
âš« Name
âš« Definition
âš« Example for an ATM application:
Customer: Owner of an account who manages
account by depositing and withdrawing funds
43
Overview
âš« A use case
diagram
identifies
transactions
between
actors and a
system as
individual use
cases
44
Use Case
âš« A use case is a coherent unit
of externally visible
functionality provided by a
system and expressed by a
sequence of messages
âš« Additional behavior can be
shown with parent-child,
extend and include use
cases
âš« It is labeled with a name that
the user can understand
45
System
âš« A system is shown as a
rectangle, labeled with
the system name
âš« Actors are outside the
system
âš« Use cases are inside the
system
âš« The rectangle shows the
scope or boundary of the
system
46
Association Relationship
âš« An association is the
communication path between
an actor and the use case that
it participates in
âš« It is shown as a solid line
âš« It does not have an arrow, and
is normally read from left to
right
âš« Here, the association is
between a Modeler and the
Create Model use case
47
Relationships in Use Cases
There are several Use Case relationships:
âš« Association
âš« Extend
âš« Generalization
âš« Uses
âš« Include
Most Use Cases have only associations.
Use other relationships sparingly.
48
Extend Relationship
âš« Extend puts additional
behavior in a use case
that does not know
about it.
âš« It is shown as a dotted
line with an arrow point
and labeled <<extend>>
âš« In this case, a customer
can request a catalog
when placing an order
49
Use Case Generalization
âš« Generalization is a
relationship between a
general use case and a
more specific use case
that inherits and extends
features to it
âš« It is shown as a solid line
with a closed arrow point
âš« Here, the payment
process is modified for
cash and charge cards
50
Uses Relationship
âš« When a use case uses
another process, the
relationship can be
shown with the uses
relationship
âš« This is shown as a solid
line with a closed arrow
point and the <<uses>>
keyword
âš« Here different system
processes can use the
logon use case
51
Include Relationship
âš« Include relationships
insert additional behavior
into a base use case
âš« They are shown as a
dotted line with an open
arrow and the key word
<<include>>
âš« Shown is a process that
I observed in an earlier
career
52
Use Case Example: Alarm Clock
This is a contrived
example, to show
many relations.
Your diagrams
should be simpler.
Class Diagrams
âš« A Class is a Description of Set of Objects
that Share the Same Attributes,
Operations, Methods, Relationships, and
Semantics
âš« Classes are Graphically Represented as
Boxes with Compartments for
âš« Class Name, Private Attributes, and
Public Operations
Class Diagram (Rumbaugh/Booch)
âš« Class Diagram Describes
– Types of Objects in Application
– Static Relationships Among Objects
– Temporal Information Not Supported
âš« Class Diagrams Contain
– Classes: Objects, Attributes, and Operations
– Packages: Groupings of Classes
– Subsystems: Grouping of Classes/Packages
âš« Main Concepts: Class, Association,
Generalization, Dependency, Realization,
Interface
Classes
A class represent a concept
A class encapsulates state (attributes) and
behavior (operations).
Each attribute has a type.
Each operation has a signature.
The class name is the only mandatory information.
zone2price
getZones()
getPrice()
TariffSchedule
Table zone2price
Enumeration getZones()
Price getPrice(Zone)
TariffSchedule
Name
Attributes
Operations
Signature
TariffSchedule
UML Class Notation
A class is a rectangle divided into three parts
– Class name
– Class attributes (i.e. data members, variables)
– Class operations (i.e. methods)
Modifiers
– Private: -
– Public: +
– Protected: #
– Static: Underlined (i.e. shared among all members of the class)
Abstract class: Name in italics
+getName() : string
+setName()
-calcInternalStuff(in x : byte, in y : decimal)
-Name : string
+ID : long
#Salary : double
Employee
• An abstract class has one or more
abstract/pure virtual functions.
• An abstract class cannot be used to instantiate
objects.
• An abstract class can contain data members.
UML Class Notation
Lines or arrows between classes indicate relationships
– Association
• A relationship between instances of two classes, where one class
must know about the other to do its work, e.g. client communicates to
server
• indicated by a straight line or arrow
– Aggregation
• An association where one class belongs to a collection, e.g. instructor
part of Faculty
• Indicated by an empty diamond on the side of the collection
– Composition
• Strong form of Aggregation
• Lifetime control; components cannot exist without the aggregate
• Indicated by a solid diamond on the side of the collection
– Inheritance
• An inheritance link indicating one class a superclass relationship, e.g.
bird is part of mammal
• Indicated by triangle pointing to superclass
Binary Association
myB.service(); myA.doSomething();
Binary Association: Both entities “Know About” each other
Optionally, may create an Associate Class
Unary Association
A knows about B, but B knows nothing about A
Arrow points in direction
of the dependency
myB.service();
Aggregation
Aggregation is an association with a “collection-member” relationship
void doSomething()
aModule.service();
Hollow diamond on
the Collection side
Composition
+getName() : string
+setName()
-calcInternalStuff(in x : byte, in y : decimal)
-Name : string
+ID : long
#Salary : double
-adfaf : bool
Employee
-members : Employee
Team
1
*
Composition is Aggregation with:
Lifetime Control (owner controls construction, destruction)
Part object may belong to only one whole object
Filled diamond on
side of the Collection
members[0] =
new Employee();
…
delete members[0];
Inheritance
Standard concept of inheritance
class B() extends A
…
Base Class
Derived Class
Generalization and Associations
Item
NonPItem PerishItem
DeliItem ProduceItem
DiaryItem
Customer
GroceryOrder
1
*
DeliOrder
1
*
contains
Supermarket example
UML Multiplicities
Multiplicities Meaning
0..1
zero or one instance. The notation n . . M
indicates n to m instances.
0..* or *
no limit on the number of instances
(including none).
1 exactly one instance
1..* at least one instance
Links on associations to specify more details about the relationship
UML Class Example
Supermarket Example in Detail
Interaction Diagrams
âš« Sequence Diagram
âš« Communication Diagram (Collaboration Diagram)
Sequence Diagram
âš« Sequence Diagram: For a Task, Indicates
the Object Interactions Over Time that are
Needed
âš« Captures Dynamic Behavior (Time-
oriented)
âš« Purposes:
âš« Model Flow Of Control
âš« Illustrate Typical Scenarios
âš« Provide Perspective on Usage an Flow
âš« Main Concepts: Interaction, Object,
Message, Activation
Sequence Diagram
Captures Dynamic Behavior (Time-Oriented)
Sequence Diagram
Sequence Diagram : Supermarket Example
Collaboration Diagram
âš« Collaboration Diagram: Structured from the
Perspective of Interactions Among Objects
âš« Captures Dynamic Behavior (Message-
oriented)
âš« Purposes:
âš« Model Flow of Control
âš« Illustrate Coordination of Object Structure
and Control
âš« Objects that Interact with Other Objects
Collaboration Diagram
Captures Dynamic Behavior (Message-
Oriented)
Collaboration Diagram
State chart Diagrams
initial State
state
transition
event
A State chart diagram shows the lifecycle of an object
• A state is a condition of an object for a particular time
• An event causes a transition from one state to another state
Here is a State chart for a Phone Line object:
State charts in UML: States in ovals, Transitions as arrows
Transitions labels have three
optional parts:
Event [Guard] / Action
– Find one of each
– Item Received is an event,
/get first item is an action,
[Not all items checked] is a
guard
State may also label activities,
e.g., do/check item
– Actions, associated with
transitions, occur quickly
and aren’t interruptible
– Activities, associated with
states, can take longer and
are interruptible
– Definition of “quickly” depends
on the kind of system,
e.g., real-time vs. info system
When to develop a state chart?
• Devices (microwave oven, Ipod)
• Complex user interfaces (e.g., menus)
• Transactions (databases, banks, etc.)
• Stateful sessions (server-side objects)
• Controllers for other objects, Etc.
Superstates (nested states)
Example shows a
super-state of three
states
Can draw a single
transition to and
from a super-state
How does this
notation make
things a bit
clearer?
Concurrency in state diagrams
– Dashed line indicates that an order is in two
different states, e.g. Checking & Authorizing
– When order leaves concurrent states, it’s in a
single state: Canceled, Delivered or Rejected
State Diagram
81
Activity Diagram
âš« Two definitions
– an activity is some task that needs to be done,
whether by a human or a computer
– an activity is a method on a class
âš« Activity arrangement
– Sequential – one activity is followed by
another
– Parallel – two or more sets of activities are
performed concurrently, and order is irrelevant
• Interleaving is permitted – we can jump
between the parallel flows
82
What is an Activity?
âš« Activity Diagrams are used to describe activities
– Activity Diagrams are useful for describing
complicated methods
– Activity Diagrams are useful for describing use
cases & since.
âš« Activity Diagrams are like Flow Charts, but Flow
Charts are usually limited to sequential activities while
Activity Diagrams can show parallel activities as well
83
Activity Diagrams - Notation
âš«Start at the top black circle
âš«If condition 1 is TRUE, go right;
if condition 2 is TRUE, go down
âš«At first bar (a synchronization
bar), break apart to follow 2
parallel paths
âš«At second bar, come together to
proceed only when both parallel
activities are done
Notation
84
Activity Diagrams – Example 1
Use Case: Receiving an Order
85
Activity Diagram – Example 2
Use Case: Receiving a Supply
86
Activity Diagram – Example 3
Use Case: Receiving an Order
and Receiving a Supply
UML Deployment Diagram
Deployment diagrams are used to visualize the
topology of the physical components of a system
where the software components are deployed.
Deployment diagrams consist of nodes and their
relationships.
Component diagrams and deployment diagrams
are closely related.
Component diagrams are used to describe the
components and deployment diagrams shows how
they are deployed in hardware.
Purpose of Deployment Diagrams
âš« Visualize hardware topology of a system.
âš« Describe the hardware components used
to deploy software components.
âš« Describe runtime processing nodes.
Where to use Deployment Diagrams?
âš« Deployment diagrams are mainly used by
system engineers.
âš« These diagrams are used to describe the
physical components (hardwares), their
distribution and association.
Usage of deployment diagrams
âš« To model the hardware topology of a system.
âš« To model embedded system.
âš« To model hardware details for a client/server
system.
âš« To model hardware details of a distributed
application.
âš« Forward and reverse engineering.
Deployment diagram for Order Management system
Communication Path
Communication path is an association
between two deployment targets.
Communication path between several application
servers and database server
Deployment Specification
A deployment specification can be aimed at a
specific type of container for a components.
The ejb-jar.xml deployment
specification
Deployment Specification Dependency
A deployment specification could be displayed as a
classifier rectangle attached to a component
artifact using a regular dependency arrow pointing
to deployed artifact.
ejb-jar.xml deployment specification for user-
service.ejb artifact
Deployment Specification Association
Deployment Diagram Example
UML Package Diagrams
UML Package Diagrams:
– Used to illustrate the logical architecture of
a system
• Layers, subsystems, Java packages
– Provides a way to group elements
• Different from (more general than) a Java
package
• Can group anything
– Classes, other packages, diagrams, use cases, …
• Nesting packages is very common
98
Package Diagrams
Package – contains classes
Dependency – changes to the
definition (interface) of one
package may cause changes in
the other package
99
Package Diagrams – Example
100
Package Diagrams – Example
Domain Package – a collection of
related packages
UML Component Diagram
âš«Component diagrams can also be described as a static
implementation view of a system.
âš«Static implementation represents the organization of the
components at a particular moment.
âš«Component diagrams are used to model physical
aspects of a system.
âš«Used to visualize the organization and relationships
among components in a system.
âš«These diagrams are also used to make executable
systems.
Purpose of the component diagram
âš« Visualize the components of a system.
âš« Construct executables by using forward and
reverse engineering.
âš« Describe the organization and relationships of
the components.
How to draw Component Diagram?
Before drawing a component diagram the following artifacts
are to be identified clearly:
– Files used in the system.
– Libraries and other artifacts relevant to the application.
– Relationships among the artifacts.
After identifying the artifacts the following points needs to be
followed:
– Use a meaningful name to identify the component for which the
diagram is to be drawn.
– Prepare a mental layout before producing using tools.
– Use notes for clarifying important points.
Where to use Component Diagrams?
âš« Model the components of a system.
âš« Model database schema.
âš« Model executables of an application.
âš« Model system's source code.
Basic Component Diagram Symbols and Notations
Component
Interface
Dependencies
Example
The Case Study
âš« The text uses the development of a
Point of Sale (POS) System as a case
study to demonstrate object oriented
software development.
âš« A POS system is a replacement for a
cash register that adds many
computer services to the traditional
cash register. Most retail stores now
use POS systems.
Architectural Layers
âš« User Interface
âš« Application Logic and Domain Objects
âš« Sale and Payment
âš« Technical Services
âš« Log and Persistence
Case Study : POS System
âš« A computerized NextGen point-of-sale (POS) system is to:
âš« record sales, and
âš« handle payments.
âš« It includes H/S components such as:
âš« Computer
âš« Bar code scanner
âš« Software
âš« It interfaces to various service applications, such as:
âš« Third party tax calculators
âš« Inventory control
âš« It must support multiple and varied client-side terminals and interfaces, such as:
âš« A thin Web browser terminal
âš« A regular PC with Java Swing graphical UI
âš« Touch screen input
⚫ Wireless PDA’s
âš« It should support different clients with different business rules.
Inception
âš« Purpose is to decide whether to
proceed with development, not to
define requirements.
âš« Only key requirements are investigated.
Inception
âš« Determine the product scope,
vision, and business case.
Questions during inception
âš« What is the vision for this project?
âš« What is the business case?
âš« Is the project feasible?
âš« Should we buy or build?
âš« Rough estimate of cost?
âš« At end of inception: Go or No Go?
Problem statement
âš« Do the stakeholders have basic
agreement on the vision of the project,
and is it worth investing in serious
investigation?
Vision and Business Case
âš« Describes the high level goals and
constraints, the business case, and
provides an executive summary.
âš« Usually has an estimate of costs (+/-
100%) and expected benefits stated in
financial terms.
Use Case Model
âš« Describes the functional requirements
and related non-functional
requirements.
âš« Preliminary only, usually the names of
most of the expected use cases and
actors, but usually only about 10% of
the use cases are detailed.
âš« Do not confuse a use case diagram
with a use case. It is mostly text.
Use Cases and Actors
âš« You should have identified most of the
use cases and actors during inception.
âš« Do not detail all of the use cases. Only
document the most important ones.
About 10 or 20% of the use cases
should be detailed enough to estimate
the scope of the total project.
Use Case Relationships
Domain Model
Use Case Model
Interaction Diagrams
Design
Requirements
Business Model
Objects, attributes, associations
VISION
GLOSSARY
SUPPLEMENTARY
SPECIFICATION
Use Cases are not Diagrams
âš« Use Cases may have a diagram associated
with them, and a use case diagram is an
easy way for an analyst to discuss a
process with a subject matter expert (SME).
âš« But use cases are primarily text. The text is
important. The diagram is optional.
Why Use Cases?
âš« Simple and familiar story-telling makes
it easier, especially for customers, to
contribute and review goals.
âš« Use cases keep it simple
âš« They emphasize goals and the user
perspective.
âš« New use case writers tend to take them
too seriously.
Actors or Use Case First?
âš« The text describes use cases substantially
before paying attention to actors.
âš« Typically, both actors and use cases are
identified early and then examined to see if
more use cases can be found from the actors,
or more actors found by examining the use
cases.
How Use Cases look like?
âš« Capture the specific ways of using the
system as dialogues between an actor
and the system.
âš« Use cases are used to
âš« Capture system requirements
âš« Communicate with end users and Subject
Matter Experts
âš« Test the system
USE CASE : Process Sale
(FULLY DRESSED VERSION)
âš« Primary Actor: Cashier
âš« Stakeholders and Interests:
Cashier: Wants accurate and fast entry, no
payment errors, …
Salesperson: Wants sales commissions
updated. …
âš« Preconditions: Cashier is identified and authenticated.
âš« Success Guarantee (Post conditions):
Sale is saved. Tax correctly calculated.…
âš« Main success scenario (or basic flow)
âš« Extensions (or alternative flows)
⚫ Special requirements: Touch screen UI, …
Use case (contd…)
âš« Technology and Data Variations List:
Identifier entered by bar code scanner,…
⚫ Open issues: What are the tax law variations? …
âš« Main success scenario (or basic flow):
The Customer arrives at a POS checkout with
items to purchase.
The cashier records the identifier for each item. If
there is more than one of the same item, the
Cashier can enter the quantity as well.
The system determines the item price and adds
the item information to the running sales
transaction. The description and the price of the
current item are presented.
Use case (contd…)
On completion of item entry, the Cashier
indicates to the POS system that item entry
is complete.
The System calculates and presents the sale
total.
The Cashier tells the customer the total. The
Customer gives a cash payment (“cash
tendered”) possibly greater than the sale
total.
âš« Extensions (or alternative flows):
If invalid identifier entered. Indicate error.
If customer didn’t have enough cash, cancel
Things that are in Use Cases
âš« Create a written document for each Use Case
âš« Clearly define intent of the Use Case
âš« Define Main Success Scenario (Happy
Path)
âš« Define any alternate action paths
âš« Use format of Stimulus: Response
âš« Each specification must be testable
⚫ Write from actor’s perspective, in actor’s
vocabulary
Use cases Template
âš« Name
âš« Primary Actor
âš« Scope
âš« Level
âš« Stakeholders and Interests
âš« Minimal Guarantee
âš« Success Guarantee
âš« Main Success Scenario
âš« Extensions
Naming Use Cases
âš« Must be a complete process from the
viewpoint of the end user.
âš« Usually in verb-object form, like Buy
Pizza
âš« Use enough detail to make it specific
âš« Use active voice, not passive
âš« From viewpoint of the actor, not the
system
Golden Rule of Use-Case Names
âš« Each use case should have a name that
indicates what value (or goal) is achieved
by the actor's interaction with the system
âš« Here are some good questions to help
you adhere to this rule:
âš« Why would the actor initiate this interaction with
the system?
âš« What goal does the actor have in mind when
undertaking these actions?
âš« What value is achieved and for which actor?
Use Case Name Examples
âš« Excellent - Purchase Concert Ticket
âš« Very Good - Purchase Concert Tickets
âš« Good - Purchase Ticket (insufficient detail)
âš« Fair - Ticket Purchase (passive)
âš« Poor - Ticket Order (system view, not user)
âš« Unacceptable - Pay for Ticket (procedure,
not process)
CRUD
Examples of bad use case names with the
acronym CRUD. (All are procedural and
reveal nothing about the actor’s intentions.)
âš« C - actor Creates data
âš« R - actor Retrieves data
âš« U - actor Updates data
âš« D - actor Deletes data
Identify Actors
âš« We cannot understand a system until we
know who will use it
âš« Direct users
âš« Users responsible to operate and maintain it
âš« External systems used by the system
âš« External systems that interact with the
system
Types of Actors
âš« Primary Actor
âš« Has goals to be fulfilled by system
âš« Supporting Actor
âš« Provides service to the system
âš« Offstage Actor
âš« Interested in the behavior, but no
contribution
In diagrams, Primary actors go on the
left and others on the right.
Define Actors
âš« Actors should not be analyzed or
described in detail unless the application
domain demands it.
âš« Template for definition:
âš« Name
âš« Definition
âš« Example for an ATM application:
Customer: Owner of an account who
manages account by depositing and
withdrawing funds
Working with Use Cases
âš« Determine the actors that will interact with the
system
âš« Examine the actors and document their
needs
âš« For each separate need, create a use case
âš« During Analysis, extend use cases with
interaction diagrams
Preconditions
âš« Anything that must always be true before
beginning a scenario is a precondition.
âš« Preconditions are assumed to be true, not
tested within the Use Case itself.
âš« Ignore obvious preconditions such as the
power being turned on. Only document items
necessary to understand the Use Case.
Success Guarantees
âš« Success Guarantees (or Post conditions)
state what must be true if the Use Case is
completed successfully. This may include
the main success scenario and some
alternative paths.
âš« Example, if the happy path is a cash sale, a
credit sale might also be regarded a
success.
âš« Stakeholders should agree on the
guarantee.
Scenarios
⚫ The Main Success Scenario, or “happy
path” is the expected primary use of the
system, without problems or exceptions.
âš« Alternative Scenarios or Extensions are
used to document other common paths
through the system and error handling or
exceptions.
Documenting the Happy Path
âš« The Success Scenario (or basic course) gives the best
understanding of the use case
âš« Each step contains the activities and inputs of the actor and the
system response
âš« If there are three or more items, create a list
âš« Label steps for configuration management and requirements
traceability
âš« Use present tense and active voice
âš« Remember that User Interface designers will use this
specification
Note: Do not use the term “happy path” in formal documents.
Documenting Extensions
âš« Use same format as Happy Path
âš« Document actions that vary from ideal path
âš« Include error conditions
âš« Number each alternate, and start with the condition:
Condition: If [actor] performs [action] the system …
âš« If subsequent steps are the same as the happy
path, identify and label as (same)
âš« Steps not included in alternate course are assumed
not to be performed.
Two Parts for Extensions
âš« Condition
âš« Describe the reason for the alternative flow
as a condition that the user can detect
âš« Handling
âš« Describe the flow of processing in the
same manner as the happy path, using a
numbering system consistent with the
original section.
Types of Use Cases
âš« High Level Use Case (Brief)
âš« Name, Actors, Purpose, Overview
âš« Expanded Use Case (Fully Dressed)
âš« Add System Events and System
Responses
âš« Essential Use Case (Black Box)
âš« Leave out technological implications
âš« Real Use Case (White Box)
âš« Leave in technology
Overview
âš« A use case
diagram
identifies
transactions
between
actors and a
system as
individual use
cases
Actor
âš« An actor is an idealized user
of a system
âš« Actors can be users,
processes, and other
systems
âš« Many users can be one
actor, in a common role
âš« One user can be different
actors, based on different
roles
âš« An actor is labeled with the
name of the role
Non-human Actor
âš« Actors can be users,
processes, and other
systems.
âš« Show non human actors
in a different manner,
usually as a rectangle
âš« Non human actors are
usually not primary users,
and thus are usually
shown on the right, not
the left.
Inventory
System
Use Case
âš« A use case is a coherent unit
of externally visible
functionality provided by a
system and expressed by a
sequence of messages
âš« Additional behavior can be
shown with parent-child,
extend and include use
cases
âš« It is labeled with a name that
the user can understand
System
âš« A system is shown as a
rectangle, labeled with
the system name
âš« Actors are outside the
system
âš« Use cases are inside the
system
âš« The rectangle shows the
scope or boundary of the
system
Association Relationship
âš« An association is the
communication path between
an actor and the use case that
it participates in
âš« It is shown as a solid line
âš« It does not have an arrow, and
is normally read from left to
right
âš« Here, the association is
between a Modeler and the
Create Model use case
Relationships in Use Cases
âš« There are several Use Case relationships:
âš« Association
âš« Extend
âš« Generalization
âš« Uses
âš« Include
Most Use Cases have only
associations. Use other
relationships sparingly.
Extend Relationship
âš« Extend puts additional
behavior in a use case that
does not know about it.
âš« It is shown as a dotted line
with an arrow point and
labeled <<extend>>
âš« In this case, a customer can
request a catalog when
placing an order
Use Case Generalization
âš« Generalization is a
relationship between a
general use case and a
more specific use case
that inherits and extends
features to it
âš« It is shown as a solid line
with a closed arrow point
âš« Here, the payment
process is modified for
cash and charge cards
Uses Relationship
âš« When a use case uses
another process, the
relationship can be
shown with the uses
relationship
âš« This is shown as a solid
line with a closed arrow
point and the <<uses>>
keyword
âš« Here different system
processes can use the
logon use case
Include Relationship
âš« Include relationships
insert additional behavior
into a base use case
âš« They are shown as a
dotted line with an open
arrow and the key word
<<include>>
âš« Shown is a process that
I observed in an earlier
career
Use Case Example: Alarm Clock
This is a contrived
example, to show
many relations.
Your diagrams
should be simpler.
Ref: Text Book-1
Craig Larman, Applying UML and Patterns: An Introduction to Object Oriented Analysis and
Design and Iterative Development, Third Edition, Pearson Education, 2005.

More Related Content

What's hot

Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented conceptsBG Java EE Course
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologiesAmith Tiwari
 
Component and Deployment Diagram - Brief Overview
Component and Deployment Diagram - Brief OverviewComponent and Deployment Diagram - Brief Overview
Component and Deployment Diagram - Brief OverviewRajiv Kumar
 
Class diagrams
Class diagramsClass diagrams
Class diagramsNadia_Nazeer
 
Domain class model
Domain class modelDomain class model
Domain class modelshekharsj
 
CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3Gobinath Subramaniam
 
Classes and Objects
Classes and Objects  Classes and Objects
Classes and Objects yndaravind
 
Class diagram
Class diagramClass diagram
Class diagramSESP123
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT Ipkaviya
 
CS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IICS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IIpkaviya
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering conceptsKomal Singh
 
Sequence diagram- UML diagram
Sequence diagram- UML diagramSequence diagram- UML diagram
Sequence diagram- UML diagramRamakant Soni
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSAshita Agrawal
 
UML Architecture and Views
UML Architecture and ViewsUML Architecture and Views
UML Architecture and ViewsKumar
 
Evolutionary models
Evolutionary modelsEvolutionary models
Evolutionary modelsPihu Goel
 

What's hot (20)

Object-oriented concepts
Object-oriented conceptsObject-oriented concepts
Object-oriented concepts
 
object oriented methodologies
object oriented methodologiesobject oriented methodologies
object oriented methodologies
 
Software design
Software designSoftware design
Software design
 
Cs8392 oops 5 units notes
Cs8392 oops 5 units notes Cs8392 oops 5 units notes
Cs8392 oops 5 units notes
 
Component and Deployment Diagram - Brief Overview
Component and Deployment Diagram - Brief OverviewComponent and Deployment Diagram - Brief Overview
Component and Deployment Diagram - Brief Overview
 
Class diagrams
Class diagramsClass diagrams
Class diagrams
 
Domain class model
Domain class modelDomain class model
Domain class model
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3CS8592-OOAD Lecture Notes Unit-3
CS8592-OOAD Lecture Notes Unit-3
 
Classes and Objects
Classes and Objects  Classes and Objects
Classes and Objects
 
Oomd unit1
Oomd unit1Oomd unit1
Oomd unit1
 
Class diagram
Class diagramClass diagram
Class diagram
 
CS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT ICS8592 Object Oriented Analysis & Design - UNIT I
CS8592 Object Oriented Analysis & Design - UNIT I
 
CS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT IICS8592 Object Oriented Analysis & Design - UNIT II
CS8592 Object Oriented Analysis & Design - UNIT II
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Sequence diagram- UML diagram
Sequence diagram- UML diagramSequence diagram- UML diagram
Sequence diagram- UML diagram
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMS
 
UML Architecture and Views
UML Architecture and ViewsUML Architecture and Views
UML Architecture and Views
 
Evolutionary models
Evolutionary modelsEvolutionary models
Evolutionary models
 

Similar to CS8592-OOAD Lecture Notes Unit-1

UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docx
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docxUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docx
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docxganeshkarthy
 
UNITTTTTTTTTTTTTTTTTTTTTTTT 1.2 (1).pptx
UNITTTTTTTTTTTTTTTTTTTTTTTT 1.2 (1).pptxUNITTTTTTTTTTTTTTTTTTTTTTTT 1.2 (1).pptx
UNITTTTTTTTTTTTTTTTTTTTTTTT 1.2 (1).pptxmailsender787
 
Ooad lab manual(original)
Ooad lab manual(original)Ooad lab manual(original)
Ooad lab manual(original)dipenpatelpatel
 
Unit IV Software Engineering
Unit IV Software EngineeringUnit IV Software Engineering
Unit IV Software EngineeringNandhini S
 
Software_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxSoftware_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxArifaMehreen1
 
Bhargav selenium
Bhargav seleniumBhargav selenium
Bhargav seleniumBHARGAV KONA
 
Object Oriented Analysis
Object Oriented AnalysisObject Oriented Analysis
Object Oriented AnalysisAMITJain879
 
Approaching ATDD/BDD
Approaching ATDD/BDDApproaching ATDD/BDD
Approaching ATDD/BDDDhaval Dalal
 
Goal Decomposition and Abductive Reasoning for Policy Analysis and Refinement
Goal Decomposition and Abductive Reasoning for Policy Analysis and RefinementGoal Decomposition and Abductive Reasoning for Policy Analysis and Refinement
Goal Decomposition and Abductive Reasoning for Policy Analysis and RefinementEmil Lupu
 
Object Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopObject Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopMohammad Shawahneh
 
Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Nuzhat Memon
 
No more Three Tier - A path to a better code for Cloud and Azure
No more Three Tier - A path to a better code for Cloud and AzureNo more Three Tier - A path to a better code for Cloud and Azure
No more Three Tier - A path to a better code for Cloud and AzureMarco Parenzan
 
Enterprise Architecture Roles And Competencies V9
Enterprise Architecture Roles And Competencies V9Enterprise Architecture Roles And Competencies V9
Enterprise Architecture Roles And Competencies V9Paul W. Johnson
 
Satellid - Pitch Deck
Satellid - Pitch DeckSatellid - Pitch Deck
Satellid - Pitch DeckM Haidar Hanif
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iTaymoor Nazmy
 

Similar to CS8592-OOAD Lecture Notes Unit-1 (20)

UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docx
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docxUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docx
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.docx
 
UNITTTTTTTTTTTTTTTTTTTTTTTT 1.2 (1).pptx
UNITTTTTTTTTTTTTTTTTTTTTTTT 1.2 (1).pptxUNITTTTTTTTTTTTTTTTTTTTTTTT 1.2 (1).pptx
UNITTTTTTTTTTTTTTTTTTTTTTTT 1.2 (1).pptx
 
Ooad lab manual(original)
Ooad lab manual(original)Ooad lab manual(original)
Ooad lab manual(original)
 
Unit IV Software Engineering
Unit IV Software EngineeringUnit IV Software Engineering
Unit IV Software Engineering
 
Software_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptxSoftware_Engineering_Presentation (1).pptx
Software_Engineering_Presentation (1).pptx
 
Bhargav selenium
Bhargav seleniumBhargav selenium
Bhargav selenium
 
C++(introduction)
C++(introduction)C++(introduction)
C++(introduction)
 
Object Oriented Analysis
Object Oriented AnalysisObject Oriented Analysis
Object Oriented Analysis
 
L05 Design Patterns
L05 Design PatternsL05 Design Patterns
L05 Design Patterns
 
Approaching ATDD/BDD
Approaching ATDD/BDDApproaching ATDD/BDD
Approaching ATDD/BDD
 
Sadchap3
Sadchap3Sadchap3
Sadchap3
 
Goal Decomposition and Abductive Reasoning for Policy Analysis and Refinement
Goal Decomposition and Abductive Reasoning for Policy Analysis and RefinementGoal Decomposition and Abductive Reasoning for Policy Analysis and Refinement
Goal Decomposition and Abductive Reasoning for Policy Analysis and Refinement
 
Object Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshopObject Oriented, Design patterns and data modelling worshop
Object Oriented, Design patterns and data modelling worshop
 
Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)Std 12 computer chapter 6 object oriented concepts (part 1)
Std 12 computer chapter 6 object oriented concepts (part 1)
 
No more Three Tier - A path to a better code for Cloud and Azure
No more Three Tier - A path to a better code for Cloud and AzureNo more Three Tier - A path to a better code for Cloud and Azure
No more Three Tier - A path to a better code for Cloud and Azure
 
Enterprise Architecture Roles And Competencies V9
Enterprise Architecture Roles And Competencies V9Enterprise Architecture Roles And Competencies V9
Enterprise Architecture Roles And Competencies V9
 
Satellid - Pitch Deck
Satellid - Pitch DeckSatellid - Pitch Deck
Satellid - Pitch Deck
 
Object oriented analysis and design unit- i
Object oriented analysis and design unit- iObject oriented analysis and design unit- i
Object oriented analysis and design unit- i
 
Man.ppt
Man.pptMan.ppt
Man.ppt
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-i
 

More from Gobinath Subramaniam

CCW332-Digital Marketing Unit-5 Notes
CCW332-Digital Marketing Unit-5 NotesCCW332-Digital Marketing Unit-5 Notes
CCW332-Digital Marketing Unit-5 NotesGobinath Subramaniam
 
CCW332-Digital Marketing Unit-4 Notes
CCW332-Digital Marketing Unit-4 NotesCCW332-Digital Marketing Unit-4 Notes
CCW332-Digital Marketing Unit-4 NotesGobinath Subramaniam
 
CCW332-Digital Marketing Unit-3 Notes
CCW332-Digital Marketing Unit-3 NotesCCW332-Digital Marketing Unit-3 Notes
CCW332-Digital Marketing Unit-3 NotesGobinath Subramaniam
 
CCCW332-Digital Marketing Unit-2 Notes
CCCW332-Digital Marketing Unit-2 NotesCCCW332-Digital Marketing Unit-2 Notes
CCCW332-Digital Marketing Unit-2 NotesGobinath Subramaniam
 
CCW332-Digital Marketing Unit-1 Notes
CCW332-Digital Marketing Unit-1 NotesCCW332-Digital Marketing Unit-1 Notes
CCW332-Digital Marketing Unit-1 NotesGobinath Subramaniam
 
CCW332-DIGITAL MARKETING.pdf
CCW332-DIGITAL MARKETING.pdfCCW332-DIGITAL MARKETING.pdf
CCW332-DIGITAL MARKETING.pdfGobinath Subramaniam
 
CS878 Green Computing Anna University Question Paper
CS878 Green Computing Anna University Question Paper CS878 Green Computing Anna University Question Paper
CS878 Green Computing Anna University Question Paper Gobinath Subramaniam
 
OBM752 Hospital Management Question Bank
OBM752 Hospital Management Question BankOBM752 Hospital Management Question Bank
OBM752 Hospital Management Question BankGobinath Subramaniam
 
CS8078-Green Computing Question Bank
CS8078-Green Computing Question BankCS8078-Green Computing Question Bank
CS8078-Green Computing Question BankGobinath Subramaniam
 
CS8078-Green Computing Notes Unit-3
CS8078-Green Computing Notes Unit-3CS8078-Green Computing Notes Unit-3
CS8078-Green Computing Notes Unit-3Gobinath Subramaniam
 
CS8078-Green Computing Notes Unit-2
CS8078-Green Computing Notes Unit-2CS8078-Green Computing Notes Unit-2
CS8078-Green Computing Notes Unit-2Gobinath Subramaniam
 
CS8078-Green Computing Unit-1
CS8078-Green Computing Unit-1CS8078-Green Computing Unit-1
CS8078-Green Computing Unit-1Gobinath Subramaniam
 
OBM752 Hospital Management Unit-5
OBM752 Hospital Management Unit-5OBM752 Hospital Management Unit-5
OBM752 Hospital Management Unit-5Gobinath Subramaniam
 
OBM752-Hospital Management Unit:4
OBM752-Hospital Management Unit:4OBM752-Hospital Management Unit:4
OBM752-Hospital Management Unit:4Gobinath Subramaniam
 
OBM752-Hospital Management Unit:3
OBM752-Hospital Management Unit:3OBM752-Hospital Management Unit:3
OBM752-Hospital Management Unit:3Gobinath Subramaniam
 
OBM752-Hospital Management Unit:2
OBM752-Hospital Management Unit:2OBM752-Hospital Management Unit:2
OBM752-Hospital Management Unit:2Gobinath Subramaniam
 
OBM752-Hospital Management Unit:1
OBM752-Hospital Management Unit:1OBM752-Hospital Management Unit:1
OBM752-Hospital Management Unit:1Gobinath Subramaniam
 
IT6801-SOA-Unit 1-Introduction to XML
IT6801-SOA-Unit 1-Introduction to XMLIT6801-SOA-Unit 1-Introduction to XML
IT6801-SOA-Unit 1-Introduction to XMLGobinath Subramaniam
 
IT6601 Mobile Computing Question Bank-2019
IT6601 Mobile Computing Question Bank-2019IT6601 Mobile Computing Question Bank-2019
IT6601 Mobile Computing Question Bank-2019Gobinath Subramaniam
 

More from Gobinath Subramaniam (20)

CCW332-Digital Marketing Unit-5 Notes
CCW332-Digital Marketing Unit-5 NotesCCW332-Digital Marketing Unit-5 Notes
CCW332-Digital Marketing Unit-5 Notes
 
CCW332-Digital Marketing Unit-4 Notes
CCW332-Digital Marketing Unit-4 NotesCCW332-Digital Marketing Unit-4 Notes
CCW332-Digital Marketing Unit-4 Notes
 
CCW332-Digital Marketing Unit-3 Notes
CCW332-Digital Marketing Unit-3 NotesCCW332-Digital Marketing Unit-3 Notes
CCW332-Digital Marketing Unit-3 Notes
 
CCCW332-Digital Marketing Unit-2 Notes
CCCW332-Digital Marketing Unit-2 NotesCCCW332-Digital Marketing Unit-2 Notes
CCCW332-Digital Marketing Unit-2 Notes
 
CCW332-Digital Marketing Unit-1 Notes
CCW332-Digital Marketing Unit-1 NotesCCW332-Digital Marketing Unit-1 Notes
CCW332-Digital Marketing Unit-1 Notes
 
CCW332-DIGITAL MARKETING.pdf
CCW332-DIGITAL MARKETING.pdfCCW332-DIGITAL MARKETING.pdf
CCW332-DIGITAL MARKETING.pdf
 
CS878 Green Computing Anna University Question Paper
CS878 Green Computing Anna University Question Paper CS878 Green Computing Anna University Question Paper
CS878 Green Computing Anna University Question Paper
 
OBM752 Hospital Management Question Bank
OBM752 Hospital Management Question BankOBM752 Hospital Management Question Bank
OBM752 Hospital Management Question Bank
 
CS8078-Green Computing Question Bank
CS8078-Green Computing Question BankCS8078-Green Computing Question Bank
CS8078-Green Computing Question Bank
 
CS8078-Green Computing Notes Unit-3
CS8078-Green Computing Notes Unit-3CS8078-Green Computing Notes Unit-3
CS8078-Green Computing Notes Unit-3
 
CS8078-Green Computing Notes Unit-2
CS8078-Green Computing Notes Unit-2CS8078-Green Computing Notes Unit-2
CS8078-Green Computing Notes Unit-2
 
CS8078-Green Computing Unit-1
CS8078-Green Computing Unit-1CS8078-Green Computing Unit-1
CS8078-Green Computing Unit-1
 
CS8592-OOAD Question Bank
CS8592-OOAD  Question BankCS8592-OOAD  Question Bank
CS8592-OOAD Question Bank
 
OBM752 Hospital Management Unit-5
OBM752 Hospital Management Unit-5OBM752 Hospital Management Unit-5
OBM752 Hospital Management Unit-5
 
OBM752-Hospital Management Unit:4
OBM752-Hospital Management Unit:4OBM752-Hospital Management Unit:4
OBM752-Hospital Management Unit:4
 
OBM752-Hospital Management Unit:3
OBM752-Hospital Management Unit:3OBM752-Hospital Management Unit:3
OBM752-Hospital Management Unit:3
 
OBM752-Hospital Management Unit:2
OBM752-Hospital Management Unit:2OBM752-Hospital Management Unit:2
OBM752-Hospital Management Unit:2
 
OBM752-Hospital Management Unit:1
OBM752-Hospital Management Unit:1OBM752-Hospital Management Unit:1
OBM752-Hospital Management Unit:1
 
IT6801-SOA-Unit 1-Introduction to XML
IT6801-SOA-Unit 1-Introduction to XMLIT6801-SOA-Unit 1-Introduction to XML
IT6801-SOA-Unit 1-Introduction to XML
 
IT6601 Mobile Computing Question Bank-2019
IT6601 Mobile Computing Question Bank-2019IT6601 Mobile Computing Question Bank-2019
IT6601 Mobile Computing Question Bank-2019
 

Recently uploaded

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 

Recently uploaded (20)

Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 

CS8592-OOAD Lecture Notes Unit-1

  • 1. 1 CS8592 OBJECT ORIENTED ANALYSIS AND DESIGN UNIT I - UNIFIED PROCESS AND USE CASE DIAGRAMS Introduction to OOAD with OO Basics - Unified Process - UML diagrams - Use Case - Case study- the Next Gen POS system, Inception - Use case Modelling - Relating Use cases - include, extend and generalization - When to use Use-cases.
  • 2. 2 Introduction to OOAD âš« Why OO? âš« What is OOAD? âš« How to do OOAD?
  • 3. What is an Object?
  • 4. What is an Object?
  • 5. What is an Object?
  • 6. What is an Object?
  • 8. 8 What is Object? âš« An "object" is anything to which a concept applies, in our awareness âš« Things drawn from the problem domain or solution space. âš« E.g., a living person in the problem domain, a software component in the solution space. âš« A structure that has identity and properties and behavior âš« It is an instance of a collective concept, i.e., a class.
  • 9. 9 Encapsulation Information hiding Objects encapsulate: property behavior as a collection of methods invoked by messages …state as a collection of instance variables Abstraction Focus on the essential Omits tremendous amount of details …Focus on what an object “is and does” What is Object-Orientation? - Abstraction and Encapsulation
  • 10. 10 What is Object-Orientation? - Another Example of Abstraction and Encapsulation Class Car Attributes âť‘ Model âť‘ Location âť‘ #Wheels = 4 Operations âť‘ Start âť‘ Accelerate <<instanceOf>> <<instanceOf>> <<instanceOf>>
  • 11. 11 What is Object-Orientation? - Class âš« What is CLASS? âš« a collection of objects that share common properties, attributes, behavior and semantics, in general. âš« A collection of objects with the same data structure (attributes, state variables) and behavior (function/code/operations) in the solution space. âš« Classification âš« Grouping of common objects into a class âš« Instantiation. âš« The act of creating an instance. Class Car Attributes âť‘ Model âť‘ Location âť‘ #Wheels = 4 Operations âť‘ Start âť‘ Accelerate <<instanceOf>> <<instanceOf>> <<instanceOf>>
  • 12. 12 What is Object-Orientation? - Subclass vs. Superclass • Specialization: The act of defining one class as a refinement of another. • Subclass: A class defined in terms of a specialization of a superclass using inheritance. • Superclass: A class serving as a base for inheritance in a class hierarchy • Inheritance: Automatic duplication of superclass attribute and behavior definitions in subclass. Person name SSN Student std-id level Employee emp-id age
  • 13. 13 What is Object-Orientation? - Polymorphism Objects of different classes respond to the same message differently. payTuition Person name SSN Student std-id level Employee emp-id In-State Student state payTuition payTuition Out-of-State Student payTuition
  • 14. 14 What is Object-Orientation? - Interfaces • Information hiding - all data should be hidden within a class, at least in principle. • make all data attributes private • provide public methods to get and set the data values (cf. Java design patterns) • e.g. Grade information is usually confidential, hence it should be kept private to the student. Access to the grade information should be done through interfaces, such as setGrade and getGrade payTuition setGrade() getGrade() Student std-id level getGrade setGrade grade
  • 15. 15 What is Object-Orientation? -State transition impossible? tom: Actor name = “Tom Cruise” katie: Actor name = “Katie Holmes” tom: Actor name = “Tom Holmes” katie: Actor name = “Katie Holmes” married/changeLastName tom: Actor name = “Tom Holmes” katie: Actor name = “Katie Holmes” suri: BabyActor name = “Suri Holmes” newArrival/getName
  • 17. 17 What is OOAD? âš« Analysis — understanding, finding and describing concepts in the problem domain. âš« Design — understanding and defining software solution/objects that represent the analysis concepts and will eventually be implemented in code. âš« OOAD — Analysis is object-oriented and design is object- oriented. A software development approach that emphasizes a logical solution based on objects.
  • 18. 18 Systems Engineering Requirements Analysis Project Planning Architectural Design Detailed Design Implementation Release Maintenance Quality Assurance Software Lifecycle How to Do OOAD – Where to Use OO?
  • 19. 19 Introduction to OOAD OO Prog. Languages (Smalltalk, C++) just program! OO Design (Booch) design then program OO Analysis (Rumbaugh, Jacobson) Process Perspective OO Technology Analyze (use case) first, then design, T then program
  • 20. 20 Knowledge Representation (in A.I.) Psychological Validity Philosophical Validity Computational Validity Databases Emphasis in Persistent Data (and now ACID properties) RelationalDB Network DB Hierarchical DB OODB Programming Languages Emphasis in Efficiency Simula, SmallTalk, C++, Protel, Java ERD SDM CM ADT ERD: Entity Relationship Diagram SDM: Semantic Data Model ADT: Abstract Data Type CM: Conceptual Model Why Object-Oriented - Who’s Behind Object-Orientation System/Software Engineering
  • 21. Unified Process âš« It emphasizes the difference between engineering and production. âš« The Unified Process is not simply a process, but rather an extensible framework which should be customized for specific organizations or projects.
  • 22. Difference: Engineering vs. Production âš« Engineering Stage âš« Driven by less predictable but smaller teams, focusing on design and synthesis activities âš« Production Stage âš« Driven by more predictable but larger teams, focusing on construction, test and deployment activities
  • 23. Phases in the Unified Process âš« The two stages of the Unified Process are decomposed into four distinct phases âš« Engineering stage 1. Inception phase 2. Elaboration phase âš« Production phase 3. Construction phase 4. Transition phase
  • 24. Elaboration Inception Construction Phases in the Unified Process Transition Transition from engineering stage to production stage.
  • 25. Inception Phase âš« Investigation âš« Establish the project scope âš« Identify the critical use cases and scenarios âš« Define acceptance criteria âš« Demonstrate at least one candidate software architecture âš« Estimate the cost and schedule for the project âš« Define and estimate potential risks
  • 26. Elaboration Phase âš« Baseline the software architecture âš« Establish a configuration management plan in which all changes are tracked and maintained âš« Baseline the problem statement âš« Baseline the software project management plan for the construction phase âš« Demonstrate that the architecture supports the requirements at a reasonable cost in a reasonable time
  • 27. Construction Phase âš« Minimize development costs by optimizing resources âš« Achieve adequate quality as rapidly as practical âš« Achieve useful version (alpha, beta, and other test releases) as soon as possible
  • 28. Transition Phase âš« The transition phase is entered when a baseline is mature âš« A usable subset of the system has been built with acceptable quality levels and user documents âš« It can be deployed to the user community âš« For some projects the transition phase means the starting point for another version of the software system âš« For other projects the transition phase means the complete delivery of the software system to a third party responsible for operation, maintenance and enhancement.
  • 29. Profile of a typical project showing the relative sizes of the four phases of the Unified Process. Relative sizes of the four phases
  • 30. Diagram illustrating how the relative emphasis of different disciplines changes over the course of the project Relative emphasis of different disciplines changes
  • 31. What is UML? âš« UUML - Unified Modeling language âš« UML is a modeling language, not a methodology or process âš« Developed by Grady Booch, James Rumbaugh and Ivar Jacobson at Rational Software. The Unified Modelling Language (UML) is a language for specifying, visualizing, constructing, and documenting the artefacts of software systems, as well as for business modelling and other non-software systems.
  • 33. Structural : element of spec. irrespective of time • Class • Component • Deployment • Object • Composite structure • Package Behavioral : behavioral features of a system / business process • Activity • State machine • Use case Interaction : emphasize object interaction • Communication(collaber ation) • Sequence • Interaction overview • Timing UML Diagrams
  • 34. 34 Use cases diagram âš« Capture the specific ways of using the system as dialogues between an actor and the system. âš« Use cases are used to âš« Capture system requirements âš« Communicate with end users and Subject Matter Experts âš« Test the system Use cases diagrams describes the behavior of the target system from an external point of view. Use cases describe "the meat" of the actual requirements.
  • 35. 35 Naming Use Cases âš« Must be a complete process from the viewpoint of the end user âš« Usually in verb-object form, like Buy Pizza âš« Use enough detail to make it specific âš« Use active voice, not passive âš« From viewpoint of the actor, not the system
  • 36. 36 Use Case Name Examples âš« Excellent - Purchase Concert Ticket âš« Very Good - Purchase Concert Tickets âš« Good - Purchase Ticket (insufficient detail) âš« Fair - Ticket Purchase (passive) âš« Poor - Ticket Order (system view, not user) âš« Unacceptable - Pay for Ticket (procedure, not process)
  • 37. 37 CRUD âš« Examples of bad use case names with the acronym CRUD. (All are procedural and reveal nothing about the actor’s intentions.) âš« C - actor Creates data âš« R - actor Retrieves data âš« U - actor Updates data âš« D - actor Deletes data
  • 38. 38 Actor âš« An actor is an idealized user of a system âš« Actors can be users, processes, and other systems âš« Many users can be one actor, in a common role âš« One user can be different actors, based on different roles âš« An actor is labeled with the name of the role
  • 39. 39 Identify Actors âš« We cannot understand a system until we know who will use it âš« Direct users âš« Users responsible to operate and maintain it âš« External systems used by the system âš« External systems that interact with the system
  • 40. 40 Non-human Actor âš« Actors can be users, processes, and other systems. âš« Show non human actors in a different manner, usually as a rectangle âš« Non human actors are usually not primary users, and thus are usually shown on the right, not the left. Inventory System
  • 41. 41 Types of Actors âš« Primary Actor âš« Has goals to be fulfilled by system âš« Supporting Actor âš« Provides service to the system âš« Offstage Actor âš« Interested in the behavior, but no contribution âš« In diagrams, Primary actors go on the left and others on the right.
  • 42. 42 Define Actors âš« Actors should not be analyzed or described in detail unless the application domain demands it. âš« Template for definition: âš« Name âš« Definition âš« Example for an ATM application: Customer: Owner of an account who manages account by depositing and withdrawing funds
  • 43. 43 Overview âš« A use case diagram identifies transactions between actors and a system as individual use cases
  • 44. 44 Use Case âš« A use case is a coherent unit of externally visible functionality provided by a system and expressed by a sequence of messages âš« Additional behavior can be shown with parent-child, extend and include use cases âš« It is labeled with a name that the user can understand
  • 45. 45 System âš« A system is shown as a rectangle, labeled with the system name âš« Actors are outside the system âš« Use cases are inside the system âš« The rectangle shows the scope or boundary of the system
  • 46. 46 Association Relationship âš« An association is the communication path between an actor and the use case that it participates in âš« It is shown as a solid line âš« It does not have an arrow, and is normally read from left to right âš« Here, the association is between a Modeler and the Create Model use case
  • 47. 47 Relationships in Use Cases There are several Use Case relationships: âš« Association âš« Extend âš« Generalization âš« Uses âš« Include Most Use Cases have only associations. Use other relationships sparingly.
  • 48. 48 Extend Relationship âš« Extend puts additional behavior in a use case that does not know about it. âš« It is shown as a dotted line with an arrow point and labeled <<extend>> âš« In this case, a customer can request a catalog when placing an order
  • 49. 49 Use Case Generalization âš« Generalization is a relationship between a general use case and a more specific use case that inherits and extends features to it âš« It is shown as a solid line with a closed arrow point âš« Here, the payment process is modified for cash and charge cards
  • 50. 50 Uses Relationship âš« When a use case uses another process, the relationship can be shown with the uses relationship âš« This is shown as a solid line with a closed arrow point and the <<uses>> keyword âš« Here different system processes can use the logon use case
  • 51. 51 Include Relationship âš« Include relationships insert additional behavior into a base use case âš« They are shown as a dotted line with an open arrow and the key word <<include>> âš« Shown is a process that I observed in an earlier career
  • 52. 52 Use Case Example: Alarm Clock This is a contrived example, to show many relations. Your diagrams should be simpler.
  • 53. Class Diagrams âš« A Class is a Description of Set of Objects that Share the Same Attributes, Operations, Methods, Relationships, and Semantics âš« Classes are Graphically Represented as Boxes with Compartments for âš« Class Name, Private Attributes, and Public Operations
  • 54. Class Diagram (Rumbaugh/Booch) âš« Class Diagram Describes – Types of Objects in Application – Static Relationships Among Objects – Temporal Information Not Supported âš« Class Diagrams Contain – Classes: Objects, Attributes, and Operations – Packages: Groupings of Classes – Subsystems: Grouping of Classes/Packages âš« Main Concepts: Class, Association, Generalization, Dependency, Realization, Interface
  • 55. Classes A class represent a concept A class encapsulates state (attributes) and behavior (operations). Each attribute has a type. Each operation has a signature. The class name is the only mandatory information. zone2price getZones() getPrice() TariffSchedule Table zone2price Enumeration getZones() Price getPrice(Zone) TariffSchedule Name Attributes Operations Signature TariffSchedule
  • 56. UML Class Notation A class is a rectangle divided into three parts – Class name – Class attributes (i.e. data members, variables) – Class operations (i.e. methods) Modifiers – Private: - – Public: + – Protected: # – Static: Underlined (i.e. shared among all members of the class) Abstract class: Name in italics +getName() : string +setName() -calcInternalStuff(in x : byte, in y : decimal) -Name : string +ID : long #Salary : double Employee • An abstract class has one or more abstract/pure virtual functions. • An abstract class cannot be used to instantiate objects. • An abstract class can contain data members.
  • 57. UML Class Notation Lines or arrows between classes indicate relationships – Association • A relationship between instances of two classes, where one class must know about the other to do its work, e.g. client communicates to server • indicated by a straight line or arrow – Aggregation • An association where one class belongs to a collection, e.g. instructor part of Faculty • Indicated by an empty diamond on the side of the collection – Composition • Strong form of Aggregation • Lifetime control; components cannot exist without the aggregate • Indicated by a solid diamond on the side of the collection – Inheritance • An inheritance link indicating one class a superclass relationship, e.g. bird is part of mammal • Indicated by triangle pointing to superclass
  • 58. Binary Association myB.service(); myA.doSomething(); Binary Association: Both entities “Know About” each other Optionally, may create an Associate Class
  • 59. Unary Association A knows about B, but B knows nothing about A Arrow points in direction of the dependency myB.service();
  • 60. Aggregation Aggregation is an association with a “collection-member” relationship void doSomething() aModule.service(); Hollow diamond on the Collection side
  • 61. Composition +getName() : string +setName() -calcInternalStuff(in x : byte, in y : decimal) -Name : string +ID : long #Salary : double -adfaf : bool Employee -members : Employee Team 1 * Composition is Aggregation with: Lifetime Control (owner controls construction, destruction) Part object may belong to only one whole object Filled diamond on side of the Collection members[0] = new Employee(); … delete members[0];
  • 62. Inheritance Standard concept of inheritance class B() extends A … Base Class Derived Class
  • 63. Generalization and Associations Item NonPItem PerishItem DeliItem ProduceItem DiaryItem Customer GroceryOrder 1 * DeliOrder 1 * contains Supermarket example
  • 64. UML Multiplicities Multiplicities Meaning 0..1 zero or one instance. The notation n . . M indicates n to m instances. 0..* or * no limit on the number of instances (including none). 1 exactly one instance 1..* at least one instance Links on associations to specify more details about the relationship
  • 67. Interaction Diagrams âš« Sequence Diagram âš« Communication Diagram (Collaboration Diagram)
  • 68. Sequence Diagram âš« Sequence Diagram: For a Task, Indicates the Object Interactions Over Time that are Needed âš« Captures Dynamic Behavior (Time- oriented) âš« Purposes: âš« Model Flow Of Control âš« Illustrate Typical Scenarios âš« Provide Perspective on Usage an Flow âš« Main Concepts: Interaction, Object, Message, Activation
  • 69. Sequence Diagram Captures Dynamic Behavior (Time-Oriented)
  • 71. Sequence Diagram : Supermarket Example
  • 72. Collaboration Diagram âš« Collaboration Diagram: Structured from the Perspective of Interactions Among Objects âš« Captures Dynamic Behavior (Message- oriented) âš« Purposes: âš« Model Flow of Control âš« Illustrate Coordination of Object Structure and Control âš« Objects that Interact with Other Objects
  • 73. Collaboration Diagram Captures Dynamic Behavior (Message- Oriented)
  • 75. State chart Diagrams initial State state transition event A State chart diagram shows the lifecycle of an object • A state is a condition of an object for a particular time • An event causes a transition from one state to another state Here is a State chart for a Phone Line object:
  • 76. State charts in UML: States in ovals, Transitions as arrows Transitions labels have three optional parts: Event [Guard] / Action – Find one of each – Item Received is an event, /get first item is an action, [Not all items checked] is a guard State may also label activities, e.g., do/check item – Actions, associated with transitions, occur quickly and aren’t interruptible – Activities, associated with states, can take longer and are interruptible – Definition of “quickly” depends on the kind of system, e.g., real-time vs. info system
  • 77. When to develop a state chart? • Devices (microwave oven, Ipod) • Complex user interfaces (e.g., menus) • Transactions (databases, banks, etc.) • Stateful sessions (server-side objects) • Controllers for other objects, Etc.
  • 78. Superstates (nested states) Example shows a super-state of three states Can draw a single transition to and from a super-state How does this notation make things a bit clearer?
  • 79. Concurrency in state diagrams – Dashed line indicates that an order is in two different states, e.g. Checking & Authorizing – When order leaves concurrent states, it’s in a single state: Canceled, Delivered or Rejected
  • 81. 81 Activity Diagram âš« Two definitions – an activity is some task that needs to be done, whether by a human or a computer – an activity is a method on a class âš« Activity arrangement – Sequential – one activity is followed by another – Parallel – two or more sets of activities are performed concurrently, and order is irrelevant • Interleaving is permitted – we can jump between the parallel flows
  • 82. 82 What is an Activity? âš« Activity Diagrams are used to describe activities – Activity Diagrams are useful for describing complicated methods – Activity Diagrams are useful for describing use cases & since. âš« Activity Diagrams are like Flow Charts, but Flow Charts are usually limited to sequential activities while Activity Diagrams can show parallel activities as well
  • 83. 83 Activity Diagrams - Notation âš«Start at the top black circle âš«If condition 1 is TRUE, go right; if condition 2 is TRUE, go down âš«At first bar (a synchronization bar), break apart to follow 2 parallel paths âš«At second bar, come together to proceed only when both parallel activities are done Notation
  • 84. 84 Activity Diagrams – Example 1 Use Case: Receiving an Order
  • 85. 85 Activity Diagram – Example 2 Use Case: Receiving a Supply
  • 86. 86 Activity Diagram – Example 3 Use Case: Receiving an Order and Receiving a Supply
  • 87. UML Deployment Diagram Deployment diagrams are used to visualize the topology of the physical components of a system where the software components are deployed. Deployment diagrams consist of nodes and their relationships. Component diagrams and deployment diagrams are closely related. Component diagrams are used to describe the components and deployment diagrams shows how they are deployed in hardware.
  • 88. Purpose of Deployment Diagrams âš« Visualize hardware topology of a system. âš« Describe the hardware components used to deploy software components. âš« Describe runtime processing nodes.
  • 89. Where to use Deployment Diagrams? âš« Deployment diagrams are mainly used by system engineers. âš« These diagrams are used to describe the physical components (hardwares), their distribution and association.
  • 90. Usage of deployment diagrams âš« To model the hardware topology of a system. âš« To model embedded system. âš« To model hardware details for a client/server system. âš« To model hardware details of a distributed application. âš« Forward and reverse engineering.
  • 91. Deployment diagram for Order Management system
  • 92. Communication Path Communication path is an association between two deployment targets. Communication path between several application servers and database server
  • 93. Deployment Specification A deployment specification can be aimed at a specific type of container for a components. The ejb-jar.xml deployment specification
  • 94. Deployment Specification Dependency A deployment specification could be displayed as a classifier rectangle attached to a component artifact using a regular dependency arrow pointing to deployed artifact. ejb-jar.xml deployment specification for user- service.ejb artifact
  • 97. UML Package Diagrams UML Package Diagrams: – Used to illustrate the logical architecture of a system • Layers, subsystems, Java packages – Provides a way to group elements • Different from (more general than) a Java package • Can group anything – Classes, other packages, diagrams, use cases, … • Nesting packages is very common
  • 98. 98 Package Diagrams Package – contains classes Dependency – changes to the definition (interface) of one package may cause changes in the other package
  • 100. 100 Package Diagrams – Example Domain Package – a collection of related packages
  • 101. UML Component Diagram âš«Component diagrams can also be described as a static implementation view of a system. âš«Static implementation represents the organization of the components at a particular moment. âš«Component diagrams are used to model physical aspects of a system. âš«Used to visualize the organization and relationships among components in a system. âš«These diagrams are also used to make executable systems.
  • 102. Purpose of the component diagram âš« Visualize the components of a system. âš« Construct executables by using forward and reverse engineering. âš« Describe the organization and relationships of the components.
  • 103. How to draw Component Diagram? Before drawing a component diagram the following artifacts are to be identified clearly: – Files used in the system. – Libraries and other artifacts relevant to the application. – Relationships among the artifacts. After identifying the artifacts the following points needs to be followed: – Use a meaningful name to identify the component for which the diagram is to be drawn. – Prepare a mental layout before producing using tools. – Use notes for clarifying important points.
  • 104. Where to use Component Diagrams? âš« Model the components of a system. âš« Model database schema. âš« Model executables of an application. âš« Model system's source code.
  • 105. Basic Component Diagram Symbols and Notations Component Interface Dependencies
  • 107. The Case Study âš« The text uses the development of a Point of Sale (POS) System as a case study to demonstrate object oriented software development. âš« A POS system is a replacement for a cash register that adds many computer services to the traditional cash register. Most retail stores now use POS systems.
  • 108. Architectural Layers âš« User Interface âš« Application Logic and Domain Objects âš« Sale and Payment âš« Technical Services âš« Log and Persistence
  • 109. Case Study : POS System âš« A computerized NextGen point-of-sale (POS) system is to: âš« record sales, and âš« handle payments. âš« It includes H/S components such as: âš« Computer âš« Bar code scanner âš« Software âš« It interfaces to various service applications, such as: âš« Third party tax calculators âš« Inventory control âš« It must support multiple and varied client-side terminals and interfaces, such as: âš« A thin Web browser terminal âš« A regular PC with Java Swing graphical UI âš« Touch screen input âš« Wireless PDA’s âš« It should support different clients with different business rules.
  • 110. Inception âš« Purpose is to decide whether to proceed with development, not to define requirements. âš« Only key requirements are investigated.
  • 111. Inception âš« Determine the product scope, vision, and business case.
  • 112. Questions during inception âš« What is the vision for this project? âš« What is the business case? âš« Is the project feasible? âš« Should we buy or build? âš« Rough estimate of cost? âš« At end of inception: Go or No Go?
  • 113. Problem statement âš« Do the stakeholders have basic agreement on the vision of the project, and is it worth investing in serious investigation?
  • 114. Vision and Business Case âš« Describes the high level goals and constraints, the business case, and provides an executive summary. âš« Usually has an estimate of costs (+/- 100%) and expected benefits stated in financial terms.
  • 115. Use Case Model âš« Describes the functional requirements and related non-functional requirements. âš« Preliminary only, usually the names of most of the expected use cases and actors, but usually only about 10% of the use cases are detailed. âš« Do not confuse a use case diagram with a use case. It is mostly text.
  • 116. Use Cases and Actors âš« You should have identified most of the use cases and actors during inception. âš« Do not detail all of the use cases. Only document the most important ones. About 10 or 20% of the use cases should be detailed enough to estimate the scope of the total project.
  • 117. Use Case Relationships Domain Model Use Case Model Interaction Diagrams Design Requirements Business Model Objects, attributes, associations VISION GLOSSARY SUPPLEMENTARY SPECIFICATION
  • 118. Use Cases are not Diagrams âš« Use Cases may have a diagram associated with them, and a use case diagram is an easy way for an analyst to discuss a process with a subject matter expert (SME). âš« But use cases are primarily text. The text is important. The diagram is optional.
  • 119. Why Use Cases? âš« Simple and familiar story-telling makes it easier, especially for customers, to contribute and review goals. âš« Use cases keep it simple âš« They emphasize goals and the user perspective. âš« New use case writers tend to take them too seriously.
  • 120. Actors or Use Case First? âš« The text describes use cases substantially before paying attention to actors. âš« Typically, both actors and use cases are identified early and then examined to see if more use cases can be found from the actors, or more actors found by examining the use cases.
  • 121. How Use Cases look like? âš« Capture the specific ways of using the system as dialogues between an actor and the system. âš« Use cases are used to âš« Capture system requirements âš« Communicate with end users and Subject Matter Experts âš« Test the system
  • 122. USE CASE : Process Sale (FULLY DRESSED VERSION) âš« Primary Actor: Cashier âš« Stakeholders and Interests: Cashier: Wants accurate and fast entry, no payment errors, … Salesperson: Wants sales commissions updated. … âš« Preconditions: Cashier is identified and authenticated. âš« Success Guarantee (Post conditions): Sale is saved. Tax correctly calculated.… âš« Main success scenario (or basic flow) âš« Extensions (or alternative flows) âš« Special requirements: Touch screen UI, …
  • 123. Use case (contd…) âš« Technology and Data Variations List: Identifier entered by bar code scanner,… âš« Open issues: What are the tax law variations? … âš« Main success scenario (or basic flow): The Customer arrives at a POS checkout with items to purchase. The cashier records the identifier for each item. If there is more than one of the same item, the Cashier can enter the quantity as well. The system determines the item price and adds the item information to the running sales transaction. The description and the price of the current item are presented.
  • 124. Use case (contd…) On completion of item entry, the Cashier indicates to the POS system that item entry is complete. The System calculates and presents the sale total. The Cashier tells the customer the total. The Customer gives a cash payment (“cash tendered”) possibly greater than the sale total. âš« Extensions (or alternative flows): If invalid identifier entered. Indicate error. If customer didn’t have enough cash, cancel
  • 125. Things that are in Use Cases âš« Create a written document for each Use Case âš« Clearly define intent of the Use Case âš« Define Main Success Scenario (Happy Path) âš« Define any alternate action paths âš« Use format of Stimulus: Response âš« Each specification must be testable âš« Write from actor’s perspective, in actor’s vocabulary
  • 126. Use cases Template âš« Name âš« Primary Actor âš« Scope âš« Level âš« Stakeholders and Interests âš« Minimal Guarantee âš« Success Guarantee âš« Main Success Scenario âš« Extensions
  • 127. Naming Use Cases âš« Must be a complete process from the viewpoint of the end user. âš« Usually in verb-object form, like Buy Pizza âš« Use enough detail to make it specific âš« Use active voice, not passive âš« From viewpoint of the actor, not the system
  • 128. Golden Rule of Use-Case Names âš« Each use case should have a name that indicates what value (or goal) is achieved by the actor's interaction with the system âš« Here are some good questions to help you adhere to this rule: âš« Why would the actor initiate this interaction with the system? âš« What goal does the actor have in mind when undertaking these actions? âš« What value is achieved and for which actor?
  • 129. Use Case Name Examples âš« Excellent - Purchase Concert Ticket âš« Very Good - Purchase Concert Tickets âš« Good - Purchase Ticket (insufficient detail) âš« Fair - Ticket Purchase (passive) âš« Poor - Ticket Order (system view, not user) âš« Unacceptable - Pay for Ticket (procedure, not process)
  • 130. CRUD Examples of bad use case names with the acronym CRUD. (All are procedural and reveal nothing about the actor’s intentions.) âš« C - actor Creates data âš« R - actor Retrieves data âš« U - actor Updates data âš« D - actor Deletes data
  • 131. Identify Actors âš« We cannot understand a system until we know who will use it âš« Direct users âš« Users responsible to operate and maintain it âš« External systems used by the system âš« External systems that interact with the system
  • 132. Types of Actors âš« Primary Actor âš« Has goals to be fulfilled by system âš« Supporting Actor âš« Provides service to the system âš« Offstage Actor âš« Interested in the behavior, but no contribution In diagrams, Primary actors go on the left and others on the right.
  • 133. Define Actors âš« Actors should not be analyzed or described in detail unless the application domain demands it. âš« Template for definition: âš« Name âš« Definition âš« Example for an ATM application: Customer: Owner of an account who manages account by depositing and withdrawing funds
  • 134. Working with Use Cases âš« Determine the actors that will interact with the system âš« Examine the actors and document their needs âš« For each separate need, create a use case âš« During Analysis, extend use cases with interaction diagrams
  • 135. Preconditions âš« Anything that must always be true before beginning a scenario is a precondition. âš« Preconditions are assumed to be true, not tested within the Use Case itself. âš« Ignore obvious preconditions such as the power being turned on. Only document items necessary to understand the Use Case.
  • 136. Success Guarantees âš« Success Guarantees (or Post conditions) state what must be true if the Use Case is completed successfully. This may include the main success scenario and some alternative paths. âš« Example, if the happy path is a cash sale, a credit sale might also be regarded a success. âš« Stakeholders should agree on the guarantee.
  • 137. Scenarios âš« The Main Success Scenario, or “happy path” is the expected primary use of the system, without problems or exceptions. âš« Alternative Scenarios or Extensions are used to document other common paths through the system and error handling or exceptions.
  • 138. Documenting the Happy Path âš« The Success Scenario (or basic course) gives the best understanding of the use case âš« Each step contains the activities and inputs of the actor and the system response âš« If there are three or more items, create a list âš« Label steps for configuration management and requirements traceability âš« Use present tense and active voice âš« Remember that User Interface designers will use this specification Note: Do not use the term “happy path” in formal documents.
  • 139. Documenting Extensions âš« Use same format as Happy Path âš« Document actions that vary from ideal path âš« Include error conditions âš« Number each alternate, and start with the condition: Condition: If [actor] performs [action] the system … âš« If subsequent steps are the same as the happy path, identify and label as (same) âš« Steps not included in alternate course are assumed not to be performed.
  • 140. Two Parts for Extensions âš« Condition âš« Describe the reason for the alternative flow as a condition that the user can detect âš« Handling âš« Describe the flow of processing in the same manner as the happy path, using a numbering system consistent with the original section.
  • 141. Types of Use Cases âš« High Level Use Case (Brief) âš« Name, Actors, Purpose, Overview âš« Expanded Use Case (Fully Dressed) âš« Add System Events and System Responses âš« Essential Use Case (Black Box) âš« Leave out technological implications âš« Real Use Case (White Box) âš« Leave in technology
  • 142. Overview âš« A use case diagram identifies transactions between actors and a system as individual use cases
  • 143. Actor âš« An actor is an idealized user of a system âš« Actors can be users, processes, and other systems âš« Many users can be one actor, in a common role âš« One user can be different actors, based on different roles âš« An actor is labeled with the name of the role
  • 144. Non-human Actor âš« Actors can be users, processes, and other systems. âš« Show non human actors in a different manner, usually as a rectangle âš« Non human actors are usually not primary users, and thus are usually shown on the right, not the left. Inventory System
  • 145. Use Case âš« A use case is a coherent unit of externally visible functionality provided by a system and expressed by a sequence of messages âš« Additional behavior can be shown with parent-child, extend and include use cases âš« It is labeled with a name that the user can understand
  • 146. System âš« A system is shown as a rectangle, labeled with the system name âš« Actors are outside the system âš« Use cases are inside the system âš« The rectangle shows the scope or boundary of the system
  • 147. Association Relationship âš« An association is the communication path between an actor and the use case that it participates in âš« It is shown as a solid line âš« It does not have an arrow, and is normally read from left to right âš« Here, the association is between a Modeler and the Create Model use case
  • 148. Relationships in Use Cases âš« There are several Use Case relationships: âš« Association âš« Extend âš« Generalization âš« Uses âš« Include Most Use Cases have only associations. Use other relationships sparingly.
  • 149. Extend Relationship âš« Extend puts additional behavior in a use case that does not know about it. âš« It is shown as a dotted line with an arrow point and labeled <<extend>> âš« In this case, a customer can request a catalog when placing an order
  • 150. Use Case Generalization âš« Generalization is a relationship between a general use case and a more specific use case that inherits and extends features to it âš« It is shown as a solid line with a closed arrow point âš« Here, the payment process is modified for cash and charge cards
  • 151. Uses Relationship âš« When a use case uses another process, the relationship can be shown with the uses relationship âš« This is shown as a solid line with a closed arrow point and the <<uses>> keyword âš« Here different system processes can use the logon use case
  • 152. Include Relationship âš« Include relationships insert additional behavior into a base use case âš« They are shown as a dotted line with an open arrow and the key word <<include>> âš« Shown is a process that I observed in an earlier career
  • 153. Use Case Example: Alarm Clock This is a contrived example, to show many relations. Your diagrams should be simpler.
  • 154. Ref: Text Book-1 Craig Larman, Applying UML and Patterns: An Introduction to Object Oriented Analysis and Design and Iterative Development, Third Edition, Pearson Education, 2005.