SlideShare a Scribd company logo
1 of 76
Overview - Object-Oriented
Analysis and Design
ī‚´ Design review
ī‚´ Object Modeling Technique
ī‚´ Object-Oriented Analysis
ī‚´ Object-Oriented Design
ī‚´ Three models
ī‚´ Object model
ī‚´ Dynamic model
ī‚´ Functional model
ī‚´ Four phases
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Design - Review
ī‚´ Design transforms requirements into
ī‚´ an architecture diagram
ī‚´ subsystems, modules and their relationships
ī‚´ a detailed design
ī‚´ a specification of the abstract interface, data structures, and algorithms of each
module
ī‚´ Also develops
ī‚´ a review plan for ensuring the design meets the requirements
ī‚´ a test plan for ensuring the implementation meets the design
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Object-Oriented Software Development
ī‚´ Object-Oriented Methodology
ī‚´ development approach used to build complex systems using
the concepts of object, class, polymorphism, and inheritance
with a view towards reusability
ī‚´ encourages software engineers to think of the problem in terms
of the application domain early and apply a consistent
approach throughout the entire life-cycle
ī‚´ Object-Oriented Analysis and Design
ī‚´ analysis models the “real-world” requirements, independent of
the implementation environment
ī‚´ design applies object-oriented concepts to develop and
communicate the architecture and details of how to meet
requirements
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Object Modeling Technique
Process via UML (OMT turned
into UML)
ī‚´ OMT [Rum Baugh et al.,1991] consists of
ī‚´ building three complementary models of the system
ī‚´ adding implementation details to the models
ī‚´ implementing the models
ī‚´ OMT includes a set of
ī‚´ phases [processes]
ī‚´ diagramming techniques
ī‚´ OMT has four phases
ī‚´ object-oriented analysis builds a real-world model
ī‚´ system design determines overall architecture of system
ī‚´ object design decides upon data structures and algorithms
ī‚´ implementation translates design into programming languageSoftware Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
OMT Stages and
Models
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Analysis
- Model of real-world situation
- What ?
System Design
- Overall architecture (sub-systems)
Object Design
- Refinement of Design
- Algorithms/data structures to
implement each class
Implementation
- Translation of object classes and
relationships to a particular
object-oriented language
time
ObjectModel
-Staticstructureofobjectsandtheirrelationships
(objectdiagram)
DynamicModel
-Controlaspectsofthesystem
(statediagrams)
FunctionalModel
-Datavaluetransforamtions
(dataflowdiagrams)
System
Introduction to Object-Oriented Analysis
ī‚´ Semi-formal technique
ī‚´ class modeling
ī‚´ dynamic modeling
ī‚´ functional modeling
ī‚´ These steps focus on
ī‚´ data
ī‚´ actions
ī‚´ and their relationships
ī‚´ Reuses familiar tools
ī‚´ E-R diagrams
ī‚´ Finite State Machines
ī‚´ Data flow diagrams
ī‚´ Steps and diagrams
ī‚´ are typically performed in
parallel after initial class
definition
ī‚´ must be kept in synch
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
â€ĸ Object-Oriented Analysis is the “requirements phase” of
Object-Oriented Software Development
–think of it as an alternative semi-formal technique
Object-Oriented Analysis
ī‚´ Builds a real-world model from requirements
ī‚´ client interviews
ī‚´ domain knowledge
ī‚´ real-world experience
ī‚´ Model is more precise and concise than the informal problem definition
ī‚´ The model addresses three aspects of objects
ī‚´ class structure and relationships
ī‚´ sequencing of interactions and events
ī‚´ data transformations and computations
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Models of Object-Oriented Analysis
ī‚´ Class Model
ī‚´ static structure
ī‚´ what objects are in the system?
ī‚´ how are they related?
ī‚´ Dynamic Model
ī‚´ behavioral aspects
ī‚´ what events occur in the system
ī‚´ when do they occur and in
what order?
ī‚´ Functional Model
ī‚´ data transformations
ī‚´ “what” does the system do
ī‚´ Data-Oriented
ī‚´ Action-Oriented
ī‚´ Both Data and Actions
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
OO Analysis and Design: Steps
ī‚´ Class Modeling
ī‚´ Dynamic Modeling
ī‚´ Functional Modeling
ī‚´ Add Operations to the Class Model
ī‚´ Iterate and refine the models
ī‚´ After the first iteration, steps may occur in parallel
or out of order
ī‚´ All models must be kept in synch as changes are made
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Class Modeling
ī‚´ Identify objects and classes
ī‚´ Prepare a data dictionary
ī‚´ Identify associations between objects
ī‚´ Identify class attributes and initial set of operations
ī‚´ Organize object classes using inheritance
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Classes, Attributes and Operations
ī‚´ Attributes define the properties of the objects
ī‚´ every instance of the class has the same attributes
ī‚´ an attribute has a data type
ī‚´ the values of the attributes may differ among instances
ī‚´ Operations define the behavior of the objects
ī‚´ action performed on or by an object
ī‚´ available for all instances of the class
ī‚´ need not be unique among classes
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Class Attributes Operations
ball radius, weight catch, throw
football air pressure pass, kick, hand-off
baseball liveness hit, pitch, tag
Class Attributes Operations
ball radius, weight catch, throw
football air pressure pass, kick, hand-off
baseball liveness hit, pitch, tag
Object Model Notation, Review
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Class Name
(Class Name)
InstanceVariable1
InstanceVariable2: type
InstanceVariable1 = value
InstanceVariable2: type
Method1()
Method2(arguments) return type
Method1()
Method2(arguments) return type
Classes are represented as rectangles;
The class name is at the top, followed by attributes
(instance variables) and methods (operations)
Depending on context some information can be
hidden such as types or method arguments
Objects are represented as rounded rectangles;
The object’s name is its classname surrounded by
parentheses
Instance variables can display the values that they
have been assigned; pointer types will often point
(not shown) to the object being referenced
OMT Instantiation Notation
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Class Name
attribute_1: data_type_1 = default_1
attribute_2: data_type_2 = default_2
. . .
attribute_m: data_type_m =
default_m
(Class Name)
attribute_1 = value_1
attribute_2 = value _2
. . .
attribute_m = value _m
Class
Instance
Instantiation - Example
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Person
name
age
weight
(Person)
(Person)
Joe Smith
age=39
weight=158
Mary Wilson
age=27
weight=121
Inheritance
ī‚´ Classes with a set of similar attributes and operations may be organized
into a hierarchical relationship
ī‚´ Common attributes and operations are factored out and assigned to a
broad superclass (generalization)
ī‚´ generalization is the “is-a” relationship
ī‚´ superclasses are ancestors, subclasses are descendants
ī‚´ A class can be iteratively refined into subclasses that inherit the attributes
and operations of the superclass (specialization)
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
OMT Inheritance Notation
Generalization
Specialization
Superclass
Subclasses
Class
Attributes
Operations
Ball
Radius, Weight
Throw, Catch
Football
air pressure
pass, kick, hand-off
Baseball
liveness
hit, pitch, tag
Basketball
air pressure , dimples
shoot, dribble, pass
Association and Links
ī‚´ An association is a relation among two or more classes
describing a group of links, with common structure and
semantics
ī‚´ A link is a relationship or connection between objects
and is an instance of an association
ī‚´ A link or association is inherently bi-directional
ī‚´ the name may imply a direction, but it can usually be inverted
ī‚´ the diagram is usually drawn to read the link or association
from left to right or top to bottom
ī‚´ A role is one end of an association
ī‚´ roles may have names
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
OMT Association Notation
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Person Company
Company Person
Works For
Class, Association, and Roles
Object and Link
Johnson IBM
Employer Employee
Works For
equivalent
(Company)(Person)
Employs
Association and Links
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Country
nam
e
(Country)
Canada
City
nam
e
has-capital
(City)
Ottawa
has-capital
(Country)
France
(City)
Paris
has-capital
(Country)
Austria
(City)
Vienna
has-capital
Class diagram
Instance diagram
Multiplicity of Associations
ī‚´ Multiplicity is the number of instances of one class that may relate to a
single instance of an associated class
ī‚´ 1-to-1
ī‚´ 1-to-many (0 or more)
ī‚´ 1-to-(zero-or-one) ‘optional’
ī‚´ 1-to-(one-or-more) ‘required’
ī‚´ 1-to-n
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
n
1+
OMT Multiplicity Notation
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Instructor Courses
Student
Teaches1+
Takes
6-65
Each course has at least one instructor
and between 6 and 65 students
A student may take many courses
An instructor may teach many courses
Link attributes for
associations
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Person
name
address
Company
name
works-for
salary
job title
Aggregation
ī‚´ Aggregation is a special form of association that indicates a “part-of”
relationship between a whole and its parts
ī‚´ Useful when the parts do not have independent existence
ī‚´ A part is subordinate to the whole
ī‚´ In an aggregation, properties and operations may be propagated from
the whole to its parts
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
OMT Aggregation Notation
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Window
TitleBar ScrollBar Border
Microcomputer
Monitor
Chassis CPU
System box Mouse Keyboard
RAM Fan
1+
1+1+
Multilevel aggregation
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
An Example
FastData Inc. wants a subsystem to process office supply orders via the Web.
The user will supply via a form their name, password, account number, and a
list of supplies along with an indication of the quantities desired. The
subsystem will validate the input, enter the order into a database, and
generate a receipt with the order number, expected ship date, and the total
cost of the order. If the validation step fails, the subsystem will generate an
error message describing the cause of the failure.
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Purpose of Example
ī‚´ We will demonstrate the UML /OMT using this example
ī‚´ Class modeling will be done first
ī‚´ Dynamic and Functional modeling will occur next lecture
ī‚´ Detailed design will also occur next lecture
ī‚´ Things to remember
ī‚´ This example does not demonstrate how the technique is applied to ALL
problems. Be sure to distinguish between the details of the example and the
details of the technique!
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Concise Problem Definition
ī‚´Define the problem concisely
ī‚´ Use only a single sentence
“FastData, Inc. employees may order office supplies via the Web and
receive a receipt confirming the order”
ī‚´This is the first step towards identifying the classes of the subsystem
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Informal Strategy
ī‚´Identify the constraints governing the system
ī‚´ Use only a single paragraph
“FastData, Inc. employees may order office supplies via
the Internal Web and receive a receipt confirming the
order. The order must include the user name, user
password, account number, and the list of supplies. A
receipt must be generated containing an order number,
ship date, and total cost. If the order is valid, it must be
entered into an order database. If the order is invalid, an
error message must be generated.”
ī‚´We now have more information to be used in identifying classes for the
subsystem
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Formalize the Strategy
ī‚´Identify the nouns of the description, which serve as the basis
for identifying the subsystem’s classes.
ī‚´ Look for out-of-domain nouns (and throw them out!)
ī‚´ Look for abstract nouns (use these for attributes)
ī‚´ The remaining nouns are good candidates!
“FastData, Inc. employees may order office supplies via the
Internal Web and receive a receipt confirming the order. The
order must include the user name, user password, account
number, and the list of supplies. A receipt must be generated
containing an order number, ship date, and total cost. If the
order is valid, it must be entered into an order database. If the
order is invalid, an error message must be generated.”
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Nouns
ī‚´ Out-of-Domain
ī‚´ Internal Web
ī‚´ Abstract
ī‚´ user name
ī‚´ user password
ī‚´ account number
ī‚´ order number
ī‚´ ship date
ī‚´ total cost
ī‚´ list of supplies
ī‚´ office supplies -> item
ī‚´ Good Candidates
ī‚´ employee
ī‚´ item (was office supplies)
ī‚´ receipt
ī‚´ order
ī‚´ order database
ī‚´ error message
ī‚´ Notes
We have decided not to worry
about the Web in this
design. Instead we focus on
the inputs and outputs and
defer the Web details until
later.
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Class Model
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
order DBemployee
name
password
order
number
account
total cost
receipt
order number
ship date
total cost
item
name
quantity
price
error message
explanation
Class Model, continued
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
response
receipt
order number
ship date
total cost
error message
explanation
Since both receipts and error messages will be generated as output
it might make sense to have them as subclasses of a more general
class. We do not know enough yet to assign it attributes however.
Class Model, relationships
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
order DBemployee
name
password
order
number
account
total cost
receipt
order number
ship date
total cost
item
name
quantity
price
1+
error message
explanation
Overview - Object-Oriented
Analysis and Design
ī‚´ Three models
ī‚´ Object model
ī‚´ Dynamic model
ī‚´ Functional model
ī‚´ Four phases
ī‚´ object-oriented analysis
ī‚´ system design
ī‚´ object design
ī‚´ Implementation
ī‚´ Detailed Design
ī‚´ Integration Testing
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
OMT Analysis and Design: Steps
ī‚´ Class Modeling
ī‚´ Dynamic Modeling
ī‚´ Functional Modeling
ī‚´ Add Operations to the Class Model
ī‚´ Iterate and refine the models
ī‚´ After the first iteration, steps may occur in parallel
or out of order
ī‚´ All models must be kept in synch as changes are made
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Dynamic Modeling
ī‚´ Prepare scenarios
ī‚´ Identify events between objects
ī‚´ Prepare an event trace for each scenario
ī‚´ Build a state diagram
ī‚´ Match events between objects to verify consistency
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Dynamic Model Diagrams
ī‚´ The dynamic model tracks behavior over time
ī‚´ described in terms of change in objects or event sequences between objects
ī‚´ Event Trace Diagrams
ī‚´ show typical dialog or usage scenarios as well as exceptional and/or special
cases
ī‚´ State Diagrams
ī‚´ relates events, states, and state transitions
ī‚´ a scenario is a path through the state diagram
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Events and Scenarios
ī‚´ An event is something that occurs between objects
ī‚´ events have attributes, which are the information transferred from one object
to another
ī‚´ A scenario is a specific sequence of events representing a path through a
system’s states
ī‚´ Legitimate scenarios
ī‚´ common paths (e.g. frequently used functionality)
ī‚´ Error conditions and known exceptions
ī‚´ An event trace extends the scenario to clarify events between objects
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Event classes and attributes
ī‚´ Event Classes
ī‚´ airplane departs (airline,
flight number, city)
ī‚´ mouse button pushed
(button, location)
ī‚´ phone receiver lifted
ī‚´ digit dialed (digit)
ī‚´ Events
ī‚´ United Flight 23 departs
from Rome
ī‚´ right mouse button pushed
at (29, 30)
ī‚´ phone receiver lifted
ī‚´ digit dialed (2)
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
An example scenario
ī‚´ Scenario for a phone call
ī‚´ caller lifts receiver
ī‚´ dial tone begins
ī‚´ caller dials digit (2)
ī‚´ caller dials digit (7)
ī‚´ caller dials digit (7)
ī‚´ caller dials digit (6)
ī‚´ specified phone rings
ī‚´ etc.
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
OMT Event Trace Notation
ī‚´ objects are vertical lines
ī‚´ events are horizontal lines
ī‚´ arrows indicate sender and
receiver
ī‚´ time passes from top to bottom
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Customer Pump Credit Corp
“select method of payment”
select “credit”
insert card
slide card through reader
“select grade”
select “premium”
verify account
return “approved”
display unit cost, total cost, gallons dispensed
“pump on”
pump gas
update display with total cost, gallons dispensed
charge total cost to account
Event Trace: example
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Caller Phone line Callee
caller lifts receiver
dial tone begins
dials (2)
dial tone ends
dials (7)
dials (7)
ringing tone phone rings
answers phone
phones connectedphones connected
callee hangs up
connection broken connection broken
caller hangs up
dials (6)
States and Transitions
ī‚´ A state is an interval between events
ī‚´ it may have an activity that can trigger starting, intermediate and ending
events
ī‚´ defined in terms of a subset of object attributes and links
ī‚´ A state transition is a change in an object’s attributes and links
ī‚´ it is the response of an object to an event
ī‚´ all transitions leaving a state must correspond to distinct events
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
OMT State Notation
ī‚´ states represented as nodes: rounded rectangles with state name
ī‚´ initial state represented as solid circle
ī‚´ final state represented as bull’s eye
ī‚´ transitions represented as edges between nodes and labeled with an
event name
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
STATE-1
STATE-3 Event-d
Event-a
Event-
c
result
STATE-2
Event-b
Event-e
OMT State Diagram - Example
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Start White´s
turn
Black´s
turn
black
moves
white
moves
checkmate
checkmate
stalemate
stalemate
Black wins
Draw
White wins
Chess game
Guards, Activities and Actions
ī‚´ Guards are Boolean conditions on attribute values
ī‚´ transition can only happen when guard evaluates to “true”
ī‚´ automatic transitions occur as soon as an activity is complete (check
guard!)
ī‚´ Activities take time to complete
ī‚´ activities take place within a state
ī‚´ Actions are relatively instantaneous
ī‚´ actions take place on a transition or within a state (entry, exit, event
actions)
ī‚´ output can occur with an event
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Guards, Activities and Actions - Example
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Vending machine model
Idle
Collecting money
coins in (amount) / add to balance
do: test item and compute change
do: dispense item do: make change
coins in (amount) / set balance
cancel / refund coins
select (item)[item empty] [change < 0]
[change = 0] [change > 0]
OMT State Relationships
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
ī‚´ States can be nested or concurrent
ī‚´ Events can be split and merged
Superstate (nesting) Superstate (concurrency)
substate-1 substate-2 substate-1
substate-1
substate-2
substate-2
substate-3
substate-4
substate-4
substate-3
split-event-0
event-1
event-1
event-1
event-2
event-2
event-2
merged-event-3
event-3
merged-event-4
(Synchronization)
State Generalization:
example
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Transmission
Neutral Reverse
First Second Third
Forward
stop
push N push F
push R
push N
upshift
downshift
upshift
downshift
Returning to the FastData example
ī‚´ Lets define a scenario for an office supply order processor: a successful
order
ī‚´ Alternatively we could describe a scenario for an unsuccessful order
ī‚´ Assumptions
ī‚´ We are not going to consider how the order form is transmitted to our system
nor how our receipt is transmitted back
ī‚´ The employee object is responsible for validating the input to the system
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
A successful order
ī‚´ input received (we don’t care how)
ī‚´ create employee object
ī‚´ pass input to employee
ī‚´ validate name and password
ī‚´ create order object
ī‚´ validate account number
ī‚´ for each item
ī‚´ create item
ī‚´ add item to order and validate item
ī‚´ compute total cost
ī‚´ add order to order DB and retrieve order number and ship date
ī‚´ generate receipt
ī‚´ return receipt (we don’t care how)
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Event Trace
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Employee Order Item Order
DB
Employee
DB
Product
DB
Account
DB
Receipt
validate name/password
validated
create
validate account number
validated
create
add
validate item
validated
repeat
Event Trace, continued
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Employee Order Item Order
DB
Employee
DB
Product
DB
Account
DB
Receipt
compute cost
add order
retrieve order number
retrieve cost
retrieve ship date
create
(One Possible) State Transition Diagram
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Idle
input
received
Employee
Validated
Employee
Created
validated
Order
Created
create
Initialization
validated
Process Order
Process
Order
Create
Item
validated
Order
Finished?
add
[remaining
items > 0]
Finalize
do: add order
create receipt
[remaining items = 0]
return
receipt
OMT Analysis and Design: Steps
ī‚´ Class Modeling
ī‚´ Dynamic Modeling
ī‚´ Functional Modeling
ī‚´ Add Operations to the Class Model
ī‚´ Iterate and refine the models
ī‚´ After the first iteration, steps may occur in parallel
or out of order
ī‚´ All models must be kept in synch as changes are made
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Functional Modeling
ī‚´ Identify input and output values
ī‚´ Build data flow diagrams showing transformation and functional
dependencies (expanding non-trivial processes)
ī‚´ Describe functions (in some language)
ī‚´ Identify constraints between objects
(add to DM and FM)
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
OMT DFD Notation
ī‚´ Processes transform data
ī‚´ Actors are sources or sinks of data (= Active Objects)
ī‚´ Data stores are persistent repositories of data, which may be
accessed or updated (= Passive Objects)
ī‚´ Data flows between processes, actors, and data stores
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Process-1 Process-2
data-1
Actor-1 DataStore-1
data-2source-data
Actor-2
sink-data
Data Value Notation
ī‚´ Data may be a composed, decomposed, or duplicated
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
data-1
data-2
data-1
data-1
data-1
composite
composite
data-
1
data-
2
Control Flow in the
DFD
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Customer
Account
balance
verify
update
amount
cash
password
coded
password
password
OK
Hierarchical DFD
ī‚´ High-level functionality iteratively refined into smaller
functional units
ī‚´ each high-level process may be expanded into a separate DFD
ī‚´ top-level processes correspond to operations on complex objects,
while lower-level processes are operations on basic objects
ī‚´ Nesting depth is dependent on application
ī‚´ terminates with simple functions
ī‚´ each level must be coherent
ī‚´ Hierarchical DFD corresponds to the following
ī‚´ context diagram shows boundaries of system
ī‚´ mid-level DFDs show context decomposition
ī‚´ primitive DFDs are simple functions that need not be expanded
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Data Flow Diagram: Office Supply example
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Web
Server
input
stream
employee
Employee
DB
validate
employee
name/
password
verification
response (receipt)
validate
order
order
Account
DB
verification
account
number
Data Flow Diagram: Office Supply example
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
response (receipt)
order process
order
Product
DB
verification item
finalize
order
validated
order
Order
DB
orderorder
info
OMT Analysis and Design: Steps
ī‚´ Class Modeling
ī‚´ Dynamic Modeling
ī‚´ Functional Modeling
ī‚´ Add Operations to the Class Model
ī‚´ Iterate and refine the models
ī‚´ After the first iteration, steps may occur in parallel
or out of order
ī‚´ All models must be kept in synch as changes are made
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Add Operations to the
Object Model
ī‚´ From the Object Model:
ī‚´ Reading/writing object attributes (e.g., get_width, get_height of Rectangle)
ī‚´ From Events, State Actions, and Activities
in the Dynamic Model:
ī‚´ Each event sent to an object => operation
(e.g., Vending machine: set_balance)
ī‚´ Actions/activities may be operations
(e.g., Vending machine: do: test item and compute charges)
ī‚´ From Functions in the Functional Model:
ī‚´ Each function in the DFD corresponds to an operation (e.g., bank example:
subtract withdrawal from Account)
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Relation of the three
models
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Things
object model
Interactions
dynamic model
Transformations
functional model
Relation of Dynamic Model
to Class Model
ī‚´ Dynamic model provides a second dimension - time -
to objects and classes
ī‚´ Dynamic model builds upon and is derived from
object model
ī‚´ states in dynamic model represent sets of attribute and
link values in object model
ī‚´ events in dynamic model represent operations in object
model
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Relation of Functional Model
to Class and Dynamic Model
ī‚´ Functional model describes the actions (what), the
dynamic model describes the timing (when), and the
class model describes what takes action (who)
ī‚´ Functional model builds upon and is derived from class
model
ī‚´ processes in the functional model correspond to operations
on objects
ī‚´ The input streams of processes in the functional model
identify objects that are related by function
ī‚´ data flows in the functional model correspond to objects or
attribute values in the class model
ī‚´ Functional model may capture actions not part of any
scenario
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
OMT: Four phases
ī‚´ Object-oriented analysis
ī‚´ builds a real-world model
ī‚´ System design
ī‚´ determines overall architecture of system
ī‚´ Object design
ī‚´ decides upon data structures and algorithms
ī‚´ Implementation
ī‚´ translates design into programming language
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
System Design
ī‚´ Devises high-level strategy for solving problem
ī‚´ Set trade-off priorities
ī‚´ Construct system architecture by organizing into subsystems (system
structuring)
ī‚´ Choose an approach for persistent data management
(repository model)
ī‚´ Allocate components to processors and tasks (distribution
model)
ī‚´ Choose the implementation of control in software system (control
modeling)
ī‚´ Identify concurrency inherent in the problem
ī‚´ Define access to global resources
ī‚´ Divide problem into implementable components (modular
decomposition)
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Object Design
ī‚´ Full definition of all the classes in the system
ī‚´ Implementation alternatives evaluated and chosen
ī‚´ Combine three models to obtain class operations
ī‚´ Design algorithms to implement operations
ī‚´ Optimize access paths to data
ī‚´ Implement control for external interactions
ī‚´ Adjust class structure to increase inheritance
ī‚´ Design associations
ī‚´ Determine object representation
ī‚´ Package classes and associations into implementable
modules
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Detailed Design
ī‚´ Detailed design is the process of completely
specifying an architectural design such that module
implementation can proceed (independently)
ī‚´ Interface specifications
ī‚´ brief description of each module
ī‚´ attributes
ī‚´ brief description and specify types
ī‚´ operations
ī‚´ brief description
ī‚´ list of parameters and parameter types
ī‚´ return type (if applicable)
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Detailed Design, continued
ī‚´ Algorithm and data structure specification
ī‚´ the designer can give hints as to what algorithms or data
structures might be most useful for a particular module
ī‚´ also, the client may have specified a particular algorithm
or data structure that must be used
ī‚´ in addition, constraints in the requirements may require
one approach over another
ī‚´ for instance, implementing a data structure so that it uses
the minimum amount of memory possible vs. keeping
everything in memory for speed
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Mapping design into code
ī‚´ Most programming languages provide very similar sets
of features
ī‚´ user-defined types
ī‚´ control structures
ī‚´ if...then...else...
ī‚´ while x do y
ī‚´ for i = 1 to x
ī‚´ etc
ī‚´ etc.
ī‚´ This means that, in general, operations can be
expressed in many different languages
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Mapping design into code,
continued
ī‚´ Major differences between languages usually fall into
these categories
ī‚´ compiled vs. interpreted
ī‚´ procedural vs. object-oriented
ī‚´ general purpose vs. application/domain specific
ī‚´ e.g. C++ vs. FileMaker Pro’s scripting language
ī‚´ If a design takes advantage of, or depends on, one or
more of these features then certain programming
languages have to be excluded from implementation
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
Modularity Mechanisms
ī‚´ One import feature of any programming language is
how it can represent modules directly
ī‚´ C and C++ have separate header and body files
ī‚´ Java has package names and class files
ī‚´ Ada has a construct called a package with a
specification and body (implementation)
ī‚´ etc.
ī‚´ These features are important since it makes it easier to
map the design into code and to trace a code
module back to its design counterpart
Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM

More Related Content

What's hot

Module 3 Object Oriented Data Models Object Oriented notations
Module 3  Object Oriented Data Models Object Oriented notationsModule 3  Object Oriented Data Models Object Oriented notations
Module 3 Object Oriented Data Models Object Oriented notationsTaher Barodawala
 
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTCS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTleela rani
 
Ooad unit 1
Ooad unit 1Ooad unit 1
Ooad unit 1raj kumar
 
Cs 2352 object oriented analysis and design
Cs 2352 object oriented analysis and designCs 2352 object oriented analysis and design
Cs 2352 object oriented analysis and designandrewsasi
 
Object Modeling Techniques
Object Modeling TechniquesObject Modeling Techniques
Object Modeling TechniquesShilpa Wadhwani
 
classes & objects introduction
classes & objects introductionclasses & objects introduction
classes & objects introductionKumar
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and DesignDr. C.V. Suresh Babu
 
Uml Tutorial
Uml TutorialUml Tutorial
Uml TutorialAkramWaseem
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Languagesurana college
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering conceptsKomal Singh
 
Lecture-03 Introduction to UML
Lecture-03 Introduction to UMLLecture-03 Introduction to UML
Lecture-03 Introduction to UMLartgreen
 
Domain class model
Domain class modelDomain class model
Domain class modelshekharsj
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentationmewaseem
 
2 class use case
2 class use case2 class use case
2 class use caseMinal Maniar
 
Java quick reference
Java quick referenceJava quick reference
Java quick referenceArthyR3
 
modeling concepts
modeling conceptsmodeling concepts
modeling conceptsMinal Maniar
 

What's hot (20)

Module 3 Object Oriented Data Models Object Oriented notations
Module 3  Object Oriented Data Models Object Oriented notationsModule 3  Object Oriented Data Models Object Oriented notations
Module 3 Object Oriented Data Models Object Oriented notations
 
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPTCS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
CS8592-OOAD-UNIT II-STATIC UML DIAGRAMS PPT
 
Ooad
OoadOoad
Ooad
 
Jeet ooad unit-2
Jeet ooad unit-2Jeet ooad unit-2
Jeet ooad unit-2
 
Ooad unit 1
Ooad unit 1Ooad unit 1
Ooad unit 1
 
Cs 2352 object oriented analysis and design
Cs 2352 object oriented analysis and designCs 2352 object oriented analysis and design
Cs 2352 object oriented analysis and design
 
Object Modeling Techniques
Object Modeling TechniquesObject Modeling Techniques
Object Modeling Techniques
 
classes & objects introduction
classes & objects introductionclasses & objects introduction
classes & objects introduction
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Uml Tutorial
Uml TutorialUml Tutorial
Uml Tutorial
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
 
Lecture-03 Introduction to UML
Lecture-03 Introduction to UMLLecture-03 Introduction to UML
Lecture-03 Introduction to UML
 
Domain class model
Domain class modelDomain class model
Domain class model
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
2 class use case
2 class use case2 class use case
2 class use case
 
Java quick reference
Java quick referenceJava quick reference
Java quick reference
 
Uml
UmlUml
Uml
 
modeling concepts
modeling conceptsmodeling concepts
modeling concepts
 

Similar to Object oriented and analysis

Analyzing a system and specifying the requirements
Analyzing a system and specifying the requirementsAnalyzing a system and specifying the requirements
Analyzing a system and specifying the requirementsvikramgopale2
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdfSHIVAM691605
 
Modeling- Object, Dynamic and Functional
Modeling- Object, Dynamic and FunctionalModeling- Object, Dynamic and Functional
Modeling- Object, Dynamic and FunctionalRajani Bhandari
 
Ooad
OoadOoad
Ooadgantib
 
New phase ii-2010
New  phase ii-2010New  phase ii-2010
New phase ii-2010vijet
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologiesnaina-rani
 
Model-Based Systems Engineering Demystified
Model-Based Systems Engineering DemystifiedModel-Based Systems Engineering Demystified
Model-Based Systems Engineering DemystifiedElizabeth Steiner
 
Requirements modeling
Requirements modelingRequirements modeling
Requirements modelingAnanthiP8
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptVGaneshKarthikeyan
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptVGaneshKarthikeyan
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptVGaneshKarthikeyan
 
OOAD unit1 introduction to object orientation
 OOAD unit1 introduction to object orientation OOAD unit1 introduction to object orientation
OOAD unit1 introduction to object orientationDr Chetan Shelke
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented DesignAravinth NSP
 
UNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxUNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxanguraju1
 
Concepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming LanguagesConcepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming Languagesppd1961
 

Similar to Object oriented and analysis (20)

Analyzing a system and specifying the requirements
Analyzing a system and specifying the requirementsAnalyzing a system and specifying the requirements
Analyzing a system and specifying the requirements
 
Oomd unit1
Oomd unit1Oomd unit1
Oomd unit1
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdf
 
Modeling- Object, Dynamic and Functional
Modeling- Object, Dynamic and FunctionalModeling- Object, Dynamic and Functional
Modeling- Object, Dynamic and Functional
 
Ooad
OoadOoad
Ooad
 
Chapter02
Chapter02Chapter02
Chapter02
 
New phase ii-2010
New  phase ii-2010New  phase ii-2010
New phase ii-2010
 
Object oriented analysis and design unit- iv
Object oriented analysis and design unit- ivObject oriented analysis and design unit- iv
Object oriented analysis and design unit- iv
 
Object oriented methodologies
Object oriented methodologiesObject oriented methodologies
Object oriented methodologies
 
Model-Based Systems Engineering Demystified
Model-Based Systems Engineering DemystifiedModel-Based Systems Engineering Demystified
Model-Based Systems Engineering Demystified
 
Ch08
Ch08Ch08
Ch08
 
Ch08
Ch08Ch08
Ch08
 
Requirements modeling
Requirements modelingRequirements modeling
Requirements modeling
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
 
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.pptUNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
UNIT-I(Unified_Process_and_Use Case_Diagrams)_OOAD.ppt
 
OOAD unit1 introduction to object orientation
 OOAD unit1 introduction to object orientation OOAD unit1 introduction to object orientation
OOAD unit1 introduction to object orientation
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
UNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptxUNIT II STATIC UML DIAGRAMS.pptx
UNIT II STATIC UML DIAGRAMS.pptx
 
Concepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming LanguagesConcepts In Object Oriented Programming Languages
Concepts In Object Oriented Programming Languages
 

Recently uploaded

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Call Girls in Naraina Delhi đŸ’¯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi đŸ’¯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi đŸ’¯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi đŸ’¯Call Us 🔝8264348440🔝soniya singh
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 

Recently uploaded (20)

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi đŸĢĻ HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi đŸĢĻ HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi đŸĢĻ HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi đŸĢĻ HOT AND SEXY VVIP 🍎 SE...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Call Girls in Naraina Delhi đŸ’¯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi đŸ’¯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi đŸ’¯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi đŸ’¯Call Us 🔝8264348440🔝
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 

Object oriented and analysis

  • 1. Overview - Object-Oriented Analysis and Design ī‚´ Design review ī‚´ Object Modeling Technique ī‚´ Object-Oriented Analysis ī‚´ Object-Oriented Design ī‚´ Three models ī‚´ Object model ī‚´ Dynamic model ī‚´ Functional model ī‚´ Four phases Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 2. Design - Review ī‚´ Design transforms requirements into ī‚´ an architecture diagram ī‚´ subsystems, modules and their relationships ī‚´ a detailed design ī‚´ a specification of the abstract interface, data structures, and algorithms of each module ī‚´ Also develops ī‚´ a review plan for ensuring the design meets the requirements ī‚´ a test plan for ensuring the implementation meets the design Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 3. Object-Oriented Software Development ī‚´ Object-Oriented Methodology ī‚´ development approach used to build complex systems using the concepts of object, class, polymorphism, and inheritance with a view towards reusability ī‚´ encourages software engineers to think of the problem in terms of the application domain early and apply a consistent approach throughout the entire life-cycle ī‚´ Object-Oriented Analysis and Design ī‚´ analysis models the “real-world” requirements, independent of the implementation environment ī‚´ design applies object-oriented concepts to develop and communicate the architecture and details of how to meet requirements Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 4. Object Modeling Technique Process via UML (OMT turned into UML) ī‚´ OMT [Rum Baugh et al.,1991] consists of ī‚´ building three complementary models of the system ī‚´ adding implementation details to the models ī‚´ implementing the models ī‚´ OMT includes a set of ī‚´ phases [processes] ī‚´ diagramming techniques ī‚´ OMT has four phases ī‚´ object-oriented analysis builds a real-world model ī‚´ system design determines overall architecture of system ī‚´ object design decides upon data structures and algorithms ī‚´ implementation translates design into programming languageSoftware Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 5. OMT Stages and Models Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design - Algorithms/data structures to implement each class Implementation - Translation of object classes and relationships to a particular object-oriented language time ObjectModel -Staticstructureofobjectsandtheirrelationships (objectdiagram) DynamicModel -Controlaspectsofthesystem (statediagrams) FunctionalModel -Datavaluetransforamtions (dataflowdiagrams) System
  • 6. Introduction to Object-Oriented Analysis ī‚´ Semi-formal technique ī‚´ class modeling ī‚´ dynamic modeling ī‚´ functional modeling ī‚´ These steps focus on ī‚´ data ī‚´ actions ī‚´ and their relationships ī‚´ Reuses familiar tools ī‚´ E-R diagrams ī‚´ Finite State Machines ī‚´ Data flow diagrams ī‚´ Steps and diagrams ī‚´ are typically performed in parallel after initial class definition ī‚´ must be kept in synch Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM â€ĸ Object-Oriented Analysis is the “requirements phase” of Object-Oriented Software Development –think of it as an alternative semi-formal technique
  • 7. Object-Oriented Analysis ī‚´ Builds a real-world model from requirements ī‚´ client interviews ī‚´ domain knowledge ī‚´ real-world experience ī‚´ Model is more precise and concise than the informal problem definition ī‚´ The model addresses three aspects of objects ī‚´ class structure and relationships ī‚´ sequencing of interactions and events ī‚´ data transformations and computations Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 8. Models of Object-Oriented Analysis ī‚´ Class Model ī‚´ static structure ī‚´ what objects are in the system? ī‚´ how are they related? ī‚´ Dynamic Model ī‚´ behavioral aspects ī‚´ what events occur in the system ī‚´ when do they occur and in what order? ī‚´ Functional Model ī‚´ data transformations ī‚´ “what” does the system do ī‚´ Data-Oriented ī‚´ Action-Oriented ī‚´ Both Data and Actions Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 9. OO Analysis and Design: Steps ī‚´ Class Modeling ī‚´ Dynamic Modeling ī‚´ Functional Modeling ī‚´ Add Operations to the Class Model ī‚´ Iterate and refine the models ī‚´ After the first iteration, steps may occur in parallel or out of order ī‚´ All models must be kept in synch as changes are made Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 10. Class Modeling ī‚´ Identify objects and classes ī‚´ Prepare a data dictionary ī‚´ Identify associations between objects ī‚´ Identify class attributes and initial set of operations ī‚´ Organize object classes using inheritance Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 11. Classes, Attributes and Operations ī‚´ Attributes define the properties of the objects ī‚´ every instance of the class has the same attributes ī‚´ an attribute has a data type ī‚´ the values of the attributes may differ among instances ī‚´ Operations define the behavior of the objects ī‚´ action performed on or by an object ī‚´ available for all instances of the class ī‚´ need not be unique among classes Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Class Attributes Operations ball radius, weight catch, throw football air pressure pass, kick, hand-off baseball liveness hit, pitch, tag Class Attributes Operations ball radius, weight catch, throw football air pressure pass, kick, hand-off baseball liveness hit, pitch, tag
  • 12. Object Model Notation, Review Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Class Name (Class Name) InstanceVariable1 InstanceVariable2: type InstanceVariable1 = value InstanceVariable2: type Method1() Method2(arguments) return type Method1() Method2(arguments) return type Classes are represented as rectangles; The class name is at the top, followed by attributes (instance variables) and methods (operations) Depending on context some information can be hidden such as types or method arguments Objects are represented as rounded rectangles; The object’s name is its classname surrounded by parentheses Instance variables can display the values that they have been assigned; pointer types will often point (not shown) to the object being referenced
  • 13. OMT Instantiation Notation Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Class Name attribute_1: data_type_1 = default_1 attribute_2: data_type_2 = default_2 . . . attribute_m: data_type_m = default_m (Class Name) attribute_1 = value_1 attribute_2 = value _2 . . . attribute_m = value _m Class Instance
  • 14. Instantiation - Example Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Person name age weight (Person) (Person) Joe Smith age=39 weight=158 Mary Wilson age=27 weight=121
  • 15. Inheritance ī‚´ Classes with a set of similar attributes and operations may be organized into a hierarchical relationship ī‚´ Common attributes and operations are factored out and assigned to a broad superclass (generalization) ī‚´ generalization is the “is-a” relationship ī‚´ superclasses are ancestors, subclasses are descendants ī‚´ A class can be iteratively refined into subclasses that inherit the attributes and operations of the superclass (specialization) Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 16. OMT Inheritance Notation Generalization Specialization Superclass Subclasses Class Attributes Operations Ball Radius, Weight Throw, Catch Football air pressure pass, kick, hand-off Baseball liveness hit, pitch, tag Basketball air pressure , dimples shoot, dribble, pass
  • 17. Association and Links ī‚´ An association is a relation among two or more classes describing a group of links, with common structure and semantics ī‚´ A link is a relationship or connection between objects and is an instance of an association ī‚´ A link or association is inherently bi-directional ī‚´ the name may imply a direction, but it can usually be inverted ī‚´ the diagram is usually drawn to read the link or association from left to right or top to bottom ī‚´ A role is one end of an association ī‚´ roles may have names Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 18. OMT Association Notation Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Person Company Company Person Works For Class, Association, and Roles Object and Link Johnson IBM Employer Employee Works For equivalent (Company)(Person) Employs
  • 19. Association and Links Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Country nam e (Country) Canada City nam e has-capital (City) Ottawa has-capital (Country) France (City) Paris has-capital (Country) Austria (City) Vienna has-capital Class diagram Instance diagram
  • 20. Multiplicity of Associations ī‚´ Multiplicity is the number of instances of one class that may relate to a single instance of an associated class ī‚´ 1-to-1 ī‚´ 1-to-many (0 or more) ī‚´ 1-to-(zero-or-one) ‘optional’ ī‚´ 1-to-(one-or-more) ‘required’ ī‚´ 1-to-n Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM n 1+
  • 21. OMT Multiplicity Notation Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Instructor Courses Student Teaches1+ Takes 6-65 Each course has at least one instructor and between 6 and 65 students A student may take many courses An instructor may teach many courses
  • 22. Link attributes for associations Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Person name address Company name works-for salary job title
  • 23. Aggregation ī‚´ Aggregation is a special form of association that indicates a “part-of” relationship between a whole and its parts ī‚´ Useful when the parts do not have independent existence ī‚´ A part is subordinate to the whole ī‚´ In an aggregation, properties and operations may be propagated from the whole to its parts Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 24. OMT Aggregation Notation Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Window TitleBar ScrollBar Border
  • 25. Microcomputer Monitor Chassis CPU System box Mouse Keyboard RAM Fan 1+ 1+1+ Multilevel aggregation Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 26. An Example FastData Inc. wants a subsystem to process office supply orders via the Web. The user will supply via a form their name, password, account number, and a list of supplies along with an indication of the quantities desired. The subsystem will validate the input, enter the order into a database, and generate a receipt with the order number, expected ship date, and the total cost of the order. If the validation step fails, the subsystem will generate an error message describing the cause of the failure. Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 27. Purpose of Example ī‚´ We will demonstrate the UML /OMT using this example ī‚´ Class modeling will be done first ī‚´ Dynamic and Functional modeling will occur next lecture ī‚´ Detailed design will also occur next lecture ī‚´ Things to remember ī‚´ This example does not demonstrate how the technique is applied to ALL problems. Be sure to distinguish between the details of the example and the details of the technique! Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 28. Concise Problem Definition ī‚´Define the problem concisely ī‚´ Use only a single sentence “FastData, Inc. employees may order office supplies via the Web and receive a receipt confirming the order” ī‚´This is the first step towards identifying the classes of the subsystem Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 29. Informal Strategy ī‚´Identify the constraints governing the system ī‚´ Use only a single paragraph “FastData, Inc. employees may order office supplies via the Internal Web and receive a receipt confirming the order. The order must include the user name, user password, account number, and the list of supplies. A receipt must be generated containing an order number, ship date, and total cost. If the order is valid, it must be entered into an order database. If the order is invalid, an error message must be generated.” ī‚´We now have more information to be used in identifying classes for the subsystem Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 30. Formalize the Strategy ī‚´Identify the nouns of the description, which serve as the basis for identifying the subsystem’s classes. ī‚´ Look for out-of-domain nouns (and throw them out!) ī‚´ Look for abstract nouns (use these for attributes) ī‚´ The remaining nouns are good candidates! “FastData, Inc. employees may order office supplies via the Internal Web and receive a receipt confirming the order. The order must include the user name, user password, account number, and the list of supplies. A receipt must be generated containing an order number, ship date, and total cost. If the order is valid, it must be entered into an order database. If the order is invalid, an error message must be generated.” Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 31. Nouns ī‚´ Out-of-Domain ī‚´ Internal Web ī‚´ Abstract ī‚´ user name ī‚´ user password ī‚´ account number ī‚´ order number ī‚´ ship date ī‚´ total cost ī‚´ list of supplies ī‚´ office supplies -> item ī‚´ Good Candidates ī‚´ employee ī‚´ item (was office supplies) ī‚´ receipt ī‚´ order ī‚´ order database ī‚´ error message ī‚´ Notes We have decided not to worry about the Web in this design. Instead we focus on the inputs and outputs and defer the Web details until later. Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 32. Class Model Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM order DBemployee name password order number account total cost receipt order number ship date total cost item name quantity price error message explanation
  • 33. Class Model, continued Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM response receipt order number ship date total cost error message explanation Since both receipts and error messages will be generated as output it might make sense to have them as subclasses of a more general class. We do not know enough yet to assign it attributes however.
  • 34. Class Model, relationships Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM order DBemployee name password order number account total cost receipt order number ship date total cost item name quantity price 1+ error message explanation
  • 35. Overview - Object-Oriented Analysis and Design ī‚´ Three models ī‚´ Object model ī‚´ Dynamic model ī‚´ Functional model ī‚´ Four phases ī‚´ object-oriented analysis ī‚´ system design ī‚´ object design ī‚´ Implementation ī‚´ Detailed Design ī‚´ Integration Testing Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 36. OMT Analysis and Design: Steps ī‚´ Class Modeling ī‚´ Dynamic Modeling ī‚´ Functional Modeling ī‚´ Add Operations to the Class Model ī‚´ Iterate and refine the models ī‚´ After the first iteration, steps may occur in parallel or out of order ī‚´ All models must be kept in synch as changes are made Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 37. Dynamic Modeling ī‚´ Prepare scenarios ī‚´ Identify events between objects ī‚´ Prepare an event trace for each scenario ī‚´ Build a state diagram ī‚´ Match events between objects to verify consistency Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 38. Dynamic Model Diagrams ī‚´ The dynamic model tracks behavior over time ī‚´ described in terms of change in objects or event sequences between objects ī‚´ Event Trace Diagrams ī‚´ show typical dialog or usage scenarios as well as exceptional and/or special cases ī‚´ State Diagrams ī‚´ relates events, states, and state transitions ī‚´ a scenario is a path through the state diagram Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 39. Events and Scenarios ī‚´ An event is something that occurs between objects ī‚´ events have attributes, which are the information transferred from one object to another ī‚´ A scenario is a specific sequence of events representing a path through a system’s states ī‚´ Legitimate scenarios ī‚´ common paths (e.g. frequently used functionality) ī‚´ Error conditions and known exceptions ī‚´ An event trace extends the scenario to clarify events between objects Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 40. Event classes and attributes ī‚´ Event Classes ī‚´ airplane departs (airline, flight number, city) ī‚´ mouse button pushed (button, location) ī‚´ phone receiver lifted ī‚´ digit dialed (digit) ī‚´ Events ī‚´ United Flight 23 departs from Rome ī‚´ right mouse button pushed at (29, 30) ī‚´ phone receiver lifted ī‚´ digit dialed (2) Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 41. An example scenario ī‚´ Scenario for a phone call ī‚´ caller lifts receiver ī‚´ dial tone begins ī‚´ caller dials digit (2) ī‚´ caller dials digit (7) ī‚´ caller dials digit (7) ī‚´ caller dials digit (6) ī‚´ specified phone rings ī‚´ etc. Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 42. OMT Event Trace Notation ī‚´ objects are vertical lines ī‚´ events are horizontal lines ī‚´ arrows indicate sender and receiver ī‚´ time passes from top to bottom Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Customer Pump Credit Corp “select method of payment” select “credit” insert card slide card through reader “select grade” select “premium” verify account return “approved” display unit cost, total cost, gallons dispensed “pump on” pump gas update display with total cost, gallons dispensed charge total cost to account
  • 43. Event Trace: example Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Caller Phone line Callee caller lifts receiver dial tone begins dials (2) dial tone ends dials (7) dials (7) ringing tone phone rings answers phone phones connectedphones connected callee hangs up connection broken connection broken caller hangs up dials (6)
  • 44. States and Transitions ī‚´ A state is an interval between events ī‚´ it may have an activity that can trigger starting, intermediate and ending events ī‚´ defined in terms of a subset of object attributes and links ī‚´ A state transition is a change in an object’s attributes and links ī‚´ it is the response of an object to an event ī‚´ all transitions leaving a state must correspond to distinct events Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 45. OMT State Notation ī‚´ states represented as nodes: rounded rectangles with state name ī‚´ initial state represented as solid circle ī‚´ final state represented as bull’s eye ī‚´ transitions represented as edges between nodes and labeled with an event name Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM STATE-1 STATE-3 Event-d Event-a Event- c result STATE-2 Event-b Event-e
  • 46. OMT State Diagram - Example Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Start White´s turn Black´s turn black moves white moves checkmate checkmate stalemate stalemate Black wins Draw White wins Chess game
  • 47. Guards, Activities and Actions ī‚´ Guards are Boolean conditions on attribute values ī‚´ transition can only happen when guard evaluates to “true” ī‚´ automatic transitions occur as soon as an activity is complete (check guard!) ī‚´ Activities take time to complete ī‚´ activities take place within a state ī‚´ Actions are relatively instantaneous ī‚´ actions take place on a transition or within a state (entry, exit, event actions) ī‚´ output can occur with an event Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 48. Guards, Activities and Actions - Example Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Vending machine model Idle Collecting money coins in (amount) / add to balance do: test item and compute change do: dispense item do: make change coins in (amount) / set balance cancel / refund coins select (item)[item empty] [change < 0] [change = 0] [change > 0]
  • 49. OMT State Relationships Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM ī‚´ States can be nested or concurrent ī‚´ Events can be split and merged Superstate (nesting) Superstate (concurrency) substate-1 substate-2 substate-1 substate-1 substate-2 substate-2 substate-3 substate-4 substate-4 substate-3 split-event-0 event-1 event-1 event-1 event-2 event-2 event-2 merged-event-3 event-3 merged-event-4 (Synchronization)
  • 50. State Generalization: example Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Transmission Neutral Reverse First Second Third Forward stop push N push F push R push N upshift downshift upshift downshift
  • 51. Returning to the FastData example ī‚´ Lets define a scenario for an office supply order processor: a successful order ī‚´ Alternatively we could describe a scenario for an unsuccessful order ī‚´ Assumptions ī‚´ We are not going to consider how the order form is transmitted to our system nor how our receipt is transmitted back ī‚´ The employee object is responsible for validating the input to the system Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 52. A successful order ī‚´ input received (we don’t care how) ī‚´ create employee object ī‚´ pass input to employee ī‚´ validate name and password ī‚´ create order object ī‚´ validate account number ī‚´ for each item ī‚´ create item ī‚´ add item to order and validate item ī‚´ compute total cost ī‚´ add order to order DB and retrieve order number and ship date ī‚´ generate receipt ī‚´ return receipt (we don’t care how) Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 53. Event Trace Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Employee Order Item Order DB Employee DB Product DB Account DB Receipt validate name/password validated create validate account number validated create add validate item validated repeat
  • 54. Event Trace, continued Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Employee Order Item Order DB Employee DB Product DB Account DB Receipt compute cost add order retrieve order number retrieve cost retrieve ship date create
  • 55. (One Possible) State Transition Diagram Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Idle input received Employee Validated Employee Created validated Order Created create Initialization validated Process Order Process Order Create Item validated Order Finished? add [remaining items > 0] Finalize do: add order create receipt [remaining items = 0] return receipt
  • 56. OMT Analysis and Design: Steps ī‚´ Class Modeling ī‚´ Dynamic Modeling ī‚´ Functional Modeling ī‚´ Add Operations to the Class Model ī‚´ Iterate and refine the models ī‚´ After the first iteration, steps may occur in parallel or out of order ī‚´ All models must be kept in synch as changes are made Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 57. Functional Modeling ī‚´ Identify input and output values ī‚´ Build data flow diagrams showing transformation and functional dependencies (expanding non-trivial processes) ī‚´ Describe functions (in some language) ī‚´ Identify constraints between objects (add to DM and FM) Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 58. OMT DFD Notation ī‚´ Processes transform data ī‚´ Actors are sources or sinks of data (= Active Objects) ī‚´ Data stores are persistent repositories of data, which may be accessed or updated (= Passive Objects) ī‚´ Data flows between processes, actors, and data stores Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Process-1 Process-2 data-1 Actor-1 DataStore-1 data-2source-data Actor-2 sink-data
  • 59. Data Value Notation ī‚´ Data may be a composed, decomposed, or duplicated Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM data-1 data-2 data-1 data-1 data-1 composite composite data- 1 data- 2
  • 60. Control Flow in the DFD Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Customer Account balance verify update amount cash password coded password password OK
  • 61. Hierarchical DFD ī‚´ High-level functionality iteratively refined into smaller functional units ī‚´ each high-level process may be expanded into a separate DFD ī‚´ top-level processes correspond to operations on complex objects, while lower-level processes are operations on basic objects ī‚´ Nesting depth is dependent on application ī‚´ terminates with simple functions ī‚´ each level must be coherent ī‚´ Hierarchical DFD corresponds to the following ī‚´ context diagram shows boundaries of system ī‚´ mid-level DFDs show context decomposition ī‚´ primitive DFDs are simple functions that need not be expanded Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 62. Data Flow Diagram: Office Supply example Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Web Server input stream employee Employee DB validate employee name/ password verification response (receipt) validate order order Account DB verification account number
  • 63. Data Flow Diagram: Office Supply example Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM response (receipt) order process order Product DB verification item finalize order validated order Order DB orderorder info
  • 64. OMT Analysis and Design: Steps ī‚´ Class Modeling ī‚´ Dynamic Modeling ī‚´ Functional Modeling ī‚´ Add Operations to the Class Model ī‚´ Iterate and refine the models ī‚´ After the first iteration, steps may occur in parallel or out of order ī‚´ All models must be kept in synch as changes are made Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 65. Add Operations to the Object Model ī‚´ From the Object Model: ī‚´ Reading/writing object attributes (e.g., get_width, get_height of Rectangle) ī‚´ From Events, State Actions, and Activities in the Dynamic Model: ī‚´ Each event sent to an object => operation (e.g., Vending machine: set_balance) ī‚´ Actions/activities may be operations (e.g., Vending machine: do: test item and compute charges) ī‚´ From Functions in the Functional Model: ī‚´ Each function in the DFD corresponds to an operation (e.g., bank example: subtract withdrawal from Account) Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 66. Relation of the three models Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM Things object model Interactions dynamic model Transformations functional model
  • 67. Relation of Dynamic Model to Class Model ī‚´ Dynamic model provides a second dimension - time - to objects and classes ī‚´ Dynamic model builds upon and is derived from object model ī‚´ states in dynamic model represent sets of attribute and link values in object model ī‚´ events in dynamic model represent operations in object model Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 68. Relation of Functional Model to Class and Dynamic Model ī‚´ Functional model describes the actions (what), the dynamic model describes the timing (when), and the class model describes what takes action (who) ī‚´ Functional model builds upon and is derived from class model ī‚´ processes in the functional model correspond to operations on objects ī‚´ The input streams of processes in the functional model identify objects that are related by function ī‚´ data flows in the functional model correspond to objects or attribute values in the class model ī‚´ Functional model may capture actions not part of any scenario Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 69. OMT: Four phases ī‚´ Object-oriented analysis ī‚´ builds a real-world model ī‚´ System design ī‚´ determines overall architecture of system ī‚´ Object design ī‚´ decides upon data structures and algorithms ī‚´ Implementation ī‚´ translates design into programming language Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 70. System Design ī‚´ Devises high-level strategy for solving problem ī‚´ Set trade-off priorities ī‚´ Construct system architecture by organizing into subsystems (system structuring) ī‚´ Choose an approach for persistent data management (repository model) ī‚´ Allocate components to processors and tasks (distribution model) ī‚´ Choose the implementation of control in software system (control modeling) ī‚´ Identify concurrency inherent in the problem ī‚´ Define access to global resources ī‚´ Divide problem into implementable components (modular decomposition) Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 71. Object Design ī‚´ Full definition of all the classes in the system ī‚´ Implementation alternatives evaluated and chosen ī‚´ Combine three models to obtain class operations ī‚´ Design algorithms to implement operations ī‚´ Optimize access paths to data ī‚´ Implement control for external interactions ī‚´ Adjust class structure to increase inheritance ī‚´ Design associations ī‚´ Determine object representation ī‚´ Package classes and associations into implementable modules Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 72. Detailed Design ī‚´ Detailed design is the process of completely specifying an architectural design such that module implementation can proceed (independently) ī‚´ Interface specifications ī‚´ brief description of each module ī‚´ attributes ī‚´ brief description and specify types ī‚´ operations ī‚´ brief description ī‚´ list of parameters and parameter types ī‚´ return type (if applicable) Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 73. Detailed Design, continued ī‚´ Algorithm and data structure specification ī‚´ the designer can give hints as to what algorithms or data structures might be most useful for a particular module ī‚´ also, the client may have specified a particular algorithm or data structure that must be used ī‚´ in addition, constraints in the requirements may require one approach over another ī‚´ for instance, implementing a data structure so that it uses the minimum amount of memory possible vs. keeping everything in memory for speed Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 74. Mapping design into code ī‚´ Most programming languages provide very similar sets of features ī‚´ user-defined types ī‚´ control structures ī‚´ if...then...else... ī‚´ while x do y ī‚´ for i = 1 to x ī‚´ etc ī‚´ etc. ī‚´ This means that, in general, operations can be expressed in many different languages Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 75. Mapping design into code, continued ī‚´ Major differences between languages usually fall into these categories ī‚´ compiled vs. interpreted ī‚´ procedural vs. object-oriented ī‚´ general purpose vs. application/domain specific ī‚´ e.g. C++ vs. FileMaker Pro’s scripting language ī‚´ If a design takes advantage of, or depends on, one or more of these features then certain programming languages have to be excluded from implementation Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM
  • 76. Modularity Mechanisms ī‚´ One import feature of any programming language is how it can represent modules directly ī‚´ C and C++ have separate header and body files ī‚´ Java has package names and class files ī‚´ Ada has a construct called a package with a specification and body (implementation) ī‚´ etc. ī‚´ These features are important since it makes it easier to map the design into code and to trace a code module back to its design counterpart Software Engineering II by: Hashim Ali, Assistant Professor, CS Deptt, UCSS AWKUM