Title: Reading Techniques for OO Design Inspections
1Reading Techniques for OO Design Inspections
Jeff Carver Forrest Shull Guilherme H.
Travassos Victor R. Basili basili,
carver_at_cs.umd.edu fshull_at_fraunhofer.org http//w
ww.cs.umd.edu/projects/SoftEng/ESEG/
Department of Computer Science Experimental
Software Engineering Group
Fraunhofer Center - Maryland
2Reading Techniques for OO Design
- OORTs (Object Oriented Reading Techniques)
- A family of reading techniques that can be used
to read OO design artifacts against - 1. themselves, and
- 2. requirements descriptions and use-cases
- within a domain in order to identify defects
among them. - Its a defect based family reading approach
3Reading Techniques for OO Design
4Reading Techniques for OO Design
Looking for discrepancies
5Reading Techniques for OO Design
Looking for discrepancies
6Reading Techniques for OO Design
7Horizontal Reading Techniques
- Ensure all design artifacts represent the same
system - Design contain complementary views of the
information - Static (class diagrams)
- Dynamic (interaction diagrams)
- Not obvious how to compare these different
perspectives
8Vertical Reading Techniques
- Ensure that the design artifacts represent the
same system described by the requirements and
use-cases - Comparing documents from different lifecycle
phases - Level of abstraction and detail are different
9What we know so far
- Techniques are feasible
- Techniques help find defects
- Vertical reading finds more OMISSION and
INCORRECT FACT discrepancies - Horizontal reading finds more INCONSISTENCY and
AMBIGUITY discrepancies
10Reading Techniques for OO DesignTeam
Organization
An inspection process with OO reading techniques
looking for consistency horizontal reading
Reader 1
Meet as a team to develop a comprehensive defect
list. Each reader is an expert in a different
aspect
looking for consistency horizontal reading
Reader 2
looking for traceability vertical reading
Final list of all defects sent to designer for
repairing
Reader 3
REMEMBER Finding defects not fixing defects
11Reading Techniques for OO Design
Requirements
Requirements
Use-Cases
Specification
Descriptions
Class
Class
State Machine
Interaction
High Level
Diagrams
Descriptions
Diagrams
Diagrams
Design
(Sequence)
Vertical reading
Horizontal
reading
12Example Gas Station Control System (GSCS)
- Recall our description of the system
- ... The gas station allows customers to purchase
gas (self-service) or to pay for maintenance work
done on their cars. Some local businesses may
have billing accounts set up so that the business
is sent a monthly bill, rather than paying for
each transaction at the time of purchase. There
will always be a cashier on-duty at the gas
station to accept cash payments or perform system
maintenance, as necessary. - The requirements in this excerpt ...concern how
the system receives payment from the customer. A
customer has the option to be billed
automatically at the time of purchase, or to be
sent a monthly bill and pay at that time.
Customers can always pay via cash or credit card.
13Defining levels of Functionality
- Requirement Requirement describes the high-level
functions of the system. Typically, requirements
are described from the users point of view. - Behavior Behaviors are low-level actions
performed by the system they are the atomic
units out of which system requirements are
composed. Users do not typically consider
behaviors an end in themselves rather, behaviors
are the steps by which some larger goal or
requirement is achieved. - Operation Operations are the very lowest-level
actions out of which system behaviors and, in
turn, requirments are composed. They represent
the communication between objects that work
together to implement system functionality.
Operations may be shown on sequence diagrams and
must have associated object behaviors.
14Example Abstracting operations to behaviors (to
requirements) in GSCS
A customer, giving his account_number, asks for
an available parking spot to park his car. To
get an available parking spot gas station owner
searches for the next parking place
available. With this information the customer can
confirm the lease of the parking place. The time
of payment (time of purchase or a monthly paper
bill) and how the service should be paid (by
cash, personal check or credit card). If the
time of payment is the same as the purchase time
and Customer decides to pay by Credit Card then
Credit Card system should be used. The Customer
can only wait for 30 seconds for the
authorization process otherwise this payment
should made by cash or personal check to avoid
other Customers waiting on the lane. It allows
the Gas Station Owner to mark a new service
purchase for this Customer at this date.
15Reading Techniques Semantic Checking
- Operations Sequence diagram describes
communications between objects. - E.g. parking_spot_request(), next_available()
16Reading Techniques Semantic Checking
- Behavior Requirements, class methods, state
diagrams often refer to behaviors provided by the
system - E.g. get an available parking spot, pay by
credit card
Requirement Reserve a Parking spot with a Credit
Card
17Constraints/Conditions
- Condition
- Describes the situation that must be true for the
functionality/service/message to which it is
attached to be executed. - Constraint
- Describes something that always has to be true in
the system. - Is not dependent on the functionality being
executed.
18Reading Techniques Semantic Checking
- Requirements often describe conditions and
constraints on functionality. - If the time of payment is the same as the
purchase time and Customer decides to pay by
Credit Card then Credit Card system should be
used. The Customer can only wait for 30 seconds
for the authorization process otherwise this
payment should be made by cash or personal check
to avoid other Customers waiting on the lane. The
Gas Station Owner should ask the Customer for a
new payment type.
19Example Conditions and Constraints
20Example Constraints/Conditions GSCS
21Discrepancy Report Forms
22Discrepancy Report - Horizontal
23Discrepancy Report - Vertical
24Reading Techniques
25Object model and Classification Diagram x
Sequence diagrams
- The artifacts
- An object model and classification diagram that
describe the objects of a system and how they are
associated. - Sequence diagrams that describe the classes,
objects, and possibly actors of a system and how
they collaborate to capture services of the
system. - The goal
- To verify that the object model and
classification diagram for the system describes
classes and their relationships in such a way
that the behaviors specified in the sequence
diagrams are correctly captured.
26Object model and Classification Diagram x
Sequence diagrams
- Step 1
- Inputs Sequence diagram.
- Outputs System objects Behaviors of the system
Conditions on the behaviors. - General instructions Take a sequence diagram and
read it to understand the system behaviors
described and how the system should implement
those behaviors. - Specific instructions
- Identify the system objects and classes, and any
actors. - Identify the information exchanged between
objects (the horizontal arrows). If the
information exchanged is very detailed, at the
level of operations, you should abstract several
operations together to understand the behaviors
they work to provide. - Identify any constraints on the operations and
behaviors.
27Object model and Classification Diagram x
Sequence diagrams
28Object model and Classification Diagram x
Sequence diagrams
- Step 1
- Inputs Sequence diagram.
- Outputs System objects Behaviors of the system
Conditions on the behaviors. - General instructions Take a sequence diagram and
read it to understand the system behaviors
described and how the system should implement
those behaviors. - Specific instructions
- Identify the system objects and classes, and any
actors. - Identify the information exchanged between
objects (the horizontal arrows). If the
information exchanged is very detailed, at the
level of operations, you should abstract several
operations together to understand the behaviors
they work to provide. - Identify any constraints on the operations and
behaviors.
29Object model and Classification Diagram x
Sequence diagrams
Get an available parking spot
Pay by Credit Card
Pay by Monthly Bill
30Object model and Classification Diagram x
Sequence diagrams
- Step 1
- Inputs Sequence diagram.
- Outputs System objects Behaviors of the system
Conditions on the behaviors. - General instructions Take a sequence diagram and
read it to understand the system behaviors
described and how the system should implement
those behaviors. - Specific instructions
- Identify the system objects and classes, and any
actors. - Identify the information exchanged between
objects (the horizontal arrows). If the
information exchanged is very detailed, at the
level of operations, you should abstract several
operations together to understand the behaviors
they work to provide. - Identify any constraints on the operations and
behaviors.
31Object model and Classification Diagram x
Sequence diagrams
Get an available parking spot
Pay by Credit Card
Pay by Monthly Bill
32Object model and Classification Diagram x
Sequence diagrams
- Step 2
- Inputs Sequence diagrams, with objects,
behaviors, and constraints marked Object model
and classification diagram. - Outputs Discrepancy reports.
- General instructions Identify and inspect the
related object model, to identify if the
corresponding system objects are described
accurately. - Specific instructions
- Verify that every object, class, and actor used
in the sequence diagram is represented by a
concrete class in a object model.
33Object model and Classification Diagram x
Sequence diagrams
Get an available parking spot
Pay by Credit Card
Pay by Monthly Bill
34Object model and Classification Diagram x
Sequence diagrams
???
Discrepancy
35Object model and Classification Diagram x
Sequence diagrams
- Step 2 (cont.)
- Verify that for every behavior or operation on
the sequence diagram, there is a corresponding
operation on the object model. Verify that there
are class behaviors in the class diagram that
encapsulate the higher-level behaviors provided
by the sequence diagram. Verify that for each
behavior, the operations described by the
sequence diagram are sufficient to achieve that
behavior.Is there an operation on the sequence
diagram for which the receiving object does not
contain an appropriate behavior on the object
model? - Are there appropriate class behaviors for the
system behaviors? - Is there an association on the classification
diagram between the two objects between which the
operation goes?
36Object model and Classification Diagram x
Sequence diagrams
Get an available parking spot
Pay by Credit Card
Pay by Monthly Bill
37(No Transcript)
38Object model and Classification Diagram x
Sequence diagrams
Get an available parking spot
Pay by Credit Card
Discrepancy
Pay by Monthly Bill
39Object model and Classification Diagram x
Sequence diagrams
- Step 2 (cont.)
- Verify that the constraints identified in the
sequence diagram can be fulfilled according to
the object model.Is all of the information
concerning constraints on the sequence diagram
captured on the object model?
40Object model and Classification Diagram x
Sequence diagrams
Get an available parking spot
Pay by Credit Card
Pay by Monthly Bill
41Object model and Classification Diagram x
Sequence diagrams
42Object model and Classification Diagram x
Sequence diagrams
- Step 2 (cont.)
- For each class, operation, and data identified
above, think about whether, based on your
previous experience, it results in a reasonable
design. Does it make sense for the class to
receive this operation with these data? Could you
verify if the constraints are feasible? Are all
of the necessary attributes defined? - For the classes specified in the sequence
diagram, do the behaviors and attributes
specified for them on the operations model make
sense? Is the name of the class appropriate for
the domain, and for its attributes and behaviors?
Are the relationships with other classes
appropriate? Are the relationships of the right
type?
43Sequence diagram x Requirements and Use Cases
- The artifacts
- A requirement and associated use case(s) that
describe important concepts of the system and the
services it provides. - One or more sequence diagrams that describe the
objects of a system and the services it provides.
- The goal
- To verify that sequence diagrams describe an
appropriate combination of objects and messages
that work to capture the functionality described
by the requirement and use case.
44Sequence diagram x Requirements and Use Cases
- Step 1
- Inputs A Requirement and associated use case.
- Outputs System concepts Behaviors provided by
systemData necessary for achieving behaviors. - General instructions Identify the functionality
described by a requirement and use case, and
important concepts of the system that are
necessary to achieve that functionality. - Specific instructions
- Find system concepts in the requirement and use
case. - For each concept, identify the behaviors in which
it is involved. Look for associated constraints
and conditions. - Also identify any information or data that is
required to be sent or received in order to
achieve the behaviors.
45Sequence diagram x Requirements and Use Cases
Text from Requirement/Use Case
- A customer, giving his account_number, asks for
an available parking spot to park his car. - To
get an available parking spot, the gas station
owner searches for the next available parking
place. - With this information the customer can
confirm the lease of the parking place. - The
time of payment (time of purchase or a monthly
paper bill) and how the service should be paid
(by cash, personal check or credit card) should
be given. - If the time of payment is the same
as the purchase time and Customer decides to pay
by Credit Card then Credit Card system should be
used. The Customer can only wait for 30 seconds
for the authorization process otherwise this
payment should made by cash or personal check to
avoid other Customers waiting on the lane. - It
allows the Gas Station Owner to mark a new
service purchase for this Customer at this date.
46Sequence diagram x Requirements and Use Cases
- Step 2
- Inputs Requirement, Use case, sequence diagram.
- Outputs System concepts Behaviors provided by
systemData exchanged between objects. - General instructions Identify and inspect the
related sequence diagrams, to identify if the
corresponding functionality is described
accurately and whether behaviors and data are
represented in the right order. - Specific instructions
- For each sequence diagram, identify the system
objects. - Identify the behaviors described by the sequence
diagrams. - Identify the information (or data) that is
exchanged between system objects.
47Sequence diagram x Requirements and Use Cases
48Sequence diagram x Requirements and Use Cases
- Step 2
- Inputs Requirement, Use case, sequence diagram.
- Outputs System concepts Behaviors provided by
systemData exchanged between objects. - General instructions Identify and inspect the
related sequence diagrams, to identify if the
corresponding functionality is described
accurately and whether behaviors and data are
represented in the right order. - Specific instructions
- For each sequence diagram, identify the system
objects. - Identify the behaviors described by the sequence
diagrams. - Identify the information (or data) that is
exchanged between system objects.
49Sequence diagram x Requirements and Use Cases
Get an available parking spot
Pay by Credit Card
50Sequence diagram x Requirements and Use Cases
- Step 2
- Inputs Requirement, Use case, sequence diagram.
- Outputs System concepts Behaviors provided by
systemData exchanged between objects. - General instructions Identify and inspect the
related sequence diagrams, to identify if the
corresponding functionality is described
accurately and whether operations and data are
represented in the right order. - Specific instructions
- For each sequence diagram, identify the system
objects. - Identify the behaviors described by the sequence
diagrams. - Identify the information (or data) that is
exchanged between system objects.
51Sequence diagram x Requirements and Use Cases
Get an available parking spot
Pay by Credit Card
52Sequence diagram x Requirements and Use Cases
- Step 3
- Inputs Requirement, Use case, sequence diagram.
- Outputs Discrepancy reports.
- General instructions Compare the marked-up
diagrams to determine whether they represent the
same domain concepts. - Specific instructions
- For each of identified concepts on the
requirement and use case, search the sequence
diagram to see if it is represented. - For each object on the sequence diagram search
the requirement and use cases to see if it is
represented.
53Sequence diagram x Requirements and Use Cases
Text from Requirement/Use Case
- A customer, giving his account_number, asks for
an available parking spot to park his car. - To
get an available parking spot, the gas station
owner searches for the next available parking
place. - With this information the customer can
confirm the lease of the parking place. - The
time of payment (time of purchase or a monthly
paper bill) and how the service should be paid
(by cash, personal check or credit card) should
be given. - If the time of payment is the same
as the purchase time and Customer decides to pay
by Credit Card then Credit Card system should be
used. The Customer can only wait for 30 seconds
for the authorization process otherwise this
payment should made by cash or personal check to
avoid other Customers waiting on the lane. - It
allows the Gas Station Owner to mark a new
service purchase for this Customer at this date.
54Sequence diagram x Requirements and Use Cases
Get an available parking spot
Discrepancy
Pay by Credit Card
55Sequence diagram x Requirements and Use Cases
- Step 3 (cont.)
- Identify the behaviors described by the sequence
diagram, and compare them with the description
used on the requirement and use case. Do the
objects exchange operations in the same specified
order? Are all transported data in the right
operations? Is data being sent between the right
two objects? - Are all the constraints and conditions from the
requirement or use case being observed in this
sequence diagram? Were the constraints observed?
Was all of the behavior and data on the sequence
diagram directly concerned with the requirement
or use case?
56Sequence diagram x Requirements and Use Cases
Text from Requirement/Use Case
- A customer, giving his account_number, asks for
an available parking spot to park his car. - To
get an available parking spot, the gas station
owner searches for the next available parking
place. - With this information the customer can
confirm the lease of the parking place. - The
time of payment (time of purchase or a monthly
paper bill) and how the service should be paid
(by cash, personal check or credit card) should
be given. - If the time of payment is the same
as the purchase time and Customer decides to pay
by Credit Card then Credit Card system should be
used. The Customer can only wait for 30 seconds
for the authorization process otherwise this
payment should made by cash or personal check to
avoid other Customers waiting on the lane. - It
allows the Gas Station Owner to mark a new
service purchase for this Customer at this date.
57Sequence diagram x Requirements and Use Cases
Get an available parking spot
Pay by Credit Card
Discrepancy
58Sequence diagram x Requirements and Use Cases
- Step 3 (cont.)
- Identify the behaviors described by the sequence
diagram, and compare them with the description
used on the requirement and use case. Do the
objects exchange operations in the same specified
order? Are all transported data in the right
operations? Is data being sent between the right
two objects? - Are all the constraints and conditions from the
requirement and use case being observed in this
sequence diagram? Were the constraints observed?
Was all of the behavior and data on the sequence
diagram directly concerned with the requirement
and use case?
59Sequence diagram x Requirements and Use Cases
Text from Requirement/Use Case
- A customer, giving his account_number, asks for
an available parking spot to park his car. - To
get an available parking spot, the gas station
owner searches for the next available parking
place. - With this information the customer can
confirm the lease of the parking place. - The
time of payment (time of purchase or a monthly
paper bill) and how the service should be paid
(by cash, personal check or credit card) should
be given. - If the time of payment is the same
as the purchase time and Customer decides to pay
by Credit Card then Credit Card system should be
used. The Customer can only wait for 30 seconds
for the authorization process otherwise this
payment should made by cash or personal check to
avoid other Customers waiting on the lane. - It
allows the Gas Station Owner to mark a new
service purchase for this Customer at this date.
60Sequence diagram x Requirements and Use Cases
Get an available parking spot
Pay by Credit Card
61State Diagrams X Class Descriptions
- The Artifacts
- A set of Class Descriptions that lists the
classes of the system along with their attributes
and behaviors - One or more State Diagrams that describe the
internal states of an object and the possible
transitions between states. - The Goal
- To verify that the classes are defined in a way
that can capture the functionality specified by
the state diagrams.
62State Diagrams X Class Descriptions
- Step 1
- Inputs State Diagram
- Outputs Object States, transition actions
- General Instructions Understand the possible
states of the object and the actions that trigger
a state change. - Specific Instructions
- Trace the sequence of states and the transitions
and underline the name of each state. - Highlight the transition actions.
- Think about how the actions and states fit
together.
63State Diagrams X Class Descriptions
64State Diagrams X Class Descriptions
- Step 2
- Inputs Class Description, State Diagram (marked)
- Outputs Relevant object attributes and
operations - General Instructions Find the class, attributes,
and operations on the Class Description that
correspond to the state diagram. - Specific Instructions
- Find the corresponding class or class hierarchy
in the Class Description. - Find out how that class encapsulates the states
from the State Diagram. - Are there any states on the state diagram
that are not in the Class Description?
65State Diagrams X Class Descriptions
Discrepancy
66State Diagrams X Class Descriptions
- Step 2 (cont)
- For each transition action or constraint, verify
that there are behaviors in the class that are
capable of achieving it. - Are all the actions encapsulated by the
behaviors? - Are all the constraints encapsulated?
- Is all of the data necessary to validate each
constraint present?
67State Diagrams X Class Descriptions
- Step 3
- Inputs Object States, Transition Actions
- Outputs Discrepancy Reports
- General Instructions Compare the Class
Description and the State Diagram to make sure
the class can capture the functionality. - Specific Instructions
- Use your semantic knowledge of the class and the
behaviors it should encapsulate to make sure that
all of the states are described.
68Sequence Diagrams X State Diagrams
- The Artifacts
- Sequence diagrams that describe the classes,
objects, and possibly actors of a system and
services they provide. - One or more State Diagrams that describe the
internal states of an object and the possible
transitions between states - The Goal
- To verify that every state transition for an
object can be achieved by the operations of that
object.
69Sequence Diagrams X State Diagrams
- Step 1
- Inputs State Diagram
- Outputs Object States, transition actions
- General Instructions Understand the possible
states of the object and the actions that trigger
a state change. - Specific Instructions
- Trace the sequence of states and the transitions
and underline the name of each state. - Highlight the transition actions.
- Think about how the actions and states fit
together.
70Sequence Diagrams X State Diagrams
71Sequence Diagrams X State Diagrams
- Step 1
- Inputs State Diagram
- Outputs Object States, transition actions
- General Instructions Understand the possible
states of the object and the actions that trigger
a state change. - Specific Instructions
- Trace the sequence of states and the transitions
and underline the name of each state. - Highlight the transition actions.
- Think about how the actions and states fit
together.
72Sequence Diagrams X State Diagrams
73Sequence Diagrams X State Diagrams
- Step 1
- Inputs State Diagram
- Outputs Object States, transition actions
- General Instructions Understand the possible
states of the object and the actions that trigger
a state change. - Specific Instructions
- Trace the sequence of states and the transitions
and underline the name of each state. - Highlight the transition actions.
- Think about how the actions and states fit
together.
74Sequence Diagrams X State Diagrams
- Step 2
- Inputs State Diagram, Transition Actions,
Sequence Diagram - Outputs Object Messages, Discrepancy Reports
- General Instructions Read the sequence diagram
to understand how the transitions are achieved by
the operations. - Specific Instructions
- Choose the Sequence diagrams that contain the
object from the State diagram - Read the sequence diagram(s) to determine the
system requirement being described. - Think about which object states are semantically
related to the system requirement. Mark these
and use for the rest of the step. - Map the operations from the Sequence diagram to
the state transitions
75Sequence Diagrams X State Diagrams
Get an available parking spot
Pay by Credit Card
76Sequence Diagrams X State Diagrams
- Step 2
- Inputs State Diagram, Transition Actions,
Sequence Diagram - Outputs Object Messages, Discrepancy Reports
- General Instructions Read the sequence diagram
to understand how the transitions are achieved by
the messages sent. - Specific Instructions
- Choose the Sequence diagrams that contain the
object from the State diagram - Read the sequence diagram(s) to determine the
system requirement being described. - Think about which object states are semantically
related to the system service. Mark these and
use for the rest of the step. - Map the operations from the Sequence diagram to
the state transitions
77Sequence Diagrams X State Diagrams
Get an available parking spot
Which one is it???
78Sequence Diagrams X State Diagrams
- Step 3
- Inputs Transition Actions, Object Messages
- Outputs Discrepancy Reports
- General Instructions Review the marked diagrams
to make sure that all transition actions are
accounted for. - Specific Instructions
- Review the State Diagram and look for actions
that were not matched with object operations from
the Sequence Diagrams. - If more than one transition action appears on the
same Sequence diagram, make sure that they appear
a correct order based on the State transitions.
79Object Model and Classification Diagrams X Class
Descriptions
- The Artifacts
- An Object Model and Classification Diagram that
describes the classes of a system and how they
are associated. - A set of Class Descriptions that lists the
classes of a system along with their attributes
and behaviors. - The Goal
- To verify that the detailed descriptions of the
classes contain all the information necessary
according to the class diagram, and that the
descriptions of the classes make semantic sense.
80Object Model and Classification Diagrams X Class
Descriptions
- Step 1
- Inputs Object Model, Classification Diagram,
Class Description - Outputs Discrepancy Reports
- General Instructions Read the object model to
understand the necessary properties of each
object. - Specific Instructions
- Make sure each object appears on the Class
Description - Make sure the name and textual description on the
Class Description are meaningful. - Make sure all attributes are described with their
types. - Make sure all the behaviors and constraints are
described.
81Object Model and Classification Diagrams X Class
Descriptions
- Step 1 (cont)
- Make sure all attributes are described with their
types. - Is the same attribute set present in both Class
Description and Object Model? - Does it make sense to put all these attributes
together? - Make sure all the behaviors and constraints are
described. - Is the same behavior set present in both Class
Description and Object Model? - Does it make sense to put all these behaviors
together? - Are all the constraints satisfiable using the
attributes and behaviors in the class? - Do the behaviors rely excessively on attributes
of other classes?
82Object Model and Classification Diagrams X Class
Descriptions
83Object Model and Classification Diagrams X Class
Descriptions
- Step 1 (cont)
- Make sure all attributes are described with their
types. - Is the same attribute set present in both Class
Description and Object Model? - Does it make sense to put all these attributes
together? - Make sure all the behaviors and constraints are
described. - Is the same behavior set present in both Class
Description and Object Model? - Does it make sense to put all these behaviors
together? - Are all the constraints satisfiable using the
attributes and behaviors in the class? - Do the behaviors rely excessively on attributes
of other classes?
84Object Model and Classification Diagrams X Class
Descriptions
85Object Model and Classification Diagrams X Class
Descriptions
- Step 1 (cont)
- Make sure any inheritance from the Classification
Diagram is properly described in the Class
Description - Verify that all relationships are correctly
described with respect to multiplicity
indications - Do object roles in Class Description and
relationship notation on Object Model and Class
Diagrams match? - Do the relationships make sense, semantically?
- Are important cardinalities described in Class
Description? - Is the relationship between classes represented
by an attribute in the Class Description?
86Object Model and Classification Diagrams X Class
Descriptions
- Step 2
- Inputs Class Description
- Outputs Discrepancy Reports
- General Instructions Review the Class
Descriptions for extraneous information - Specific Instructions
- Make sure that all of the classes described in
the Object Model and Classification Diagram
appear on the Class Description.
87Class Descriptions X Requirements
- The Artifacts
- A set of Requirements that describe the concepts
and services necessary in the final system. - A set of Class Descriptions that lists the
classes of the system along with their attributes
and behaviors. - The Goal
- To verify that the concepts and services that are
described by the functional requirements are
captured appropriately by the class description.
88Class Descriptions X Requirements
- Step 1
- Inputs Set of Requirements
- Outputs Candidate Classes/objects/attributes/serv
ices, Constraints or Conditions on services - General Instructions Read requirements to
understand functionality - Specific Instructions
- Read each requirement to understand the
functionality described. - Find the nouns, they are candidates to be
classes, or attributes - Find the verbs, or descriptions of actions, they
are candidates to be behaviors or operations - Look for descriptions of constraints or
conditions on the nouns and verbs.
89Class Descriptions X Requirements
- Requirements excerpt
- 9. If a customer wishes to reserve a parking
spot he will provide his account number to the
cashier. The cashier will use the system to
search for an available spot. If an available
spot is found, it will be marked as not
available and returned to the cashier. The
customer has the same options for paying for as
parking spot as he does for paying for gasoline. - 10. When the customer is finished with the
parking spot, the cashier informs the system
that the spot is available again.
90Class Descriptions X Requirements
- Step 1
- Inputs Set of Requirements
- Outputs Candidate Classes/objects/attributes/serv
ices, Constraints or Conditions on services - General Instructions Read requirements to
understand functionality - Specific Instructions
- Read each requirement to understand the
functionality described. - Find the nouns, they are candidates to be
classes, or attributes - Find the verbs, or descriptions of actions, they
are candidates to be behaviors or operations - Look for descriptions of constraints or
conditions on the nouns and verbs.
91Class Descriptions X Requirements
- Requirements excerpt
- 9. If a customer wishes to reserve a parking
spot he will provide his account number to the
cashier. The cashier will use the system to
search for an available spot. If an available
spot is found, it will be marked as not
available and returned to the cashier. The
customer has the same options for paying for as
parking spot as he does for paying for gasoline. - 10. When the customer is finished with the
parking spot, the cashier informs the system
that the spot is available again.
92Class Descriptions X Requirements
- Step 2
- Inputs Set of requirements, Class Descriptions
- Outputs Corresponding concepts on Class
Descriptions and requirements, Discrepancy
reports - General Instructions Compare the Class
Descriptions to the requirements to verify if the
requirements were captured correctly. - Specific Instructions
- For each action in the requirements, look for a
corresponding (by name or by meaning) behavior in
the Class Description - For each noun, look for a class, set of classes,
or attribute in the Class Description
93Class Descriptions X Requirements
- 9. If a customer wishes to reserve a parking
spot he will provide his account number to the
cashier. The cashier will use the system to
search for an available spot. If an available
spot is found, it will be marked as not
available and returned to the cashier. The
customer has the same options for paying for as
parking spot as he does for paying for gasoline. - 10. When the customer is finished with the
parking spot, the cashier informs the system
that the spot is available again.
94Class Descriptions X Requirements
- Step 2
- If the noun corresponds to a class
- Does the Class Description clearly describe the
functionality associated with the noun? -
- Are all the associated nouns encapsulated as
attributes and the associated verbs encapsulated
as behaviors? - Are all the conditions and constraints that were
described by the requirements captured in the
Class Description?
95Class Descriptions X Requirements
- Step 3
- Inputs Set of Requirements, Class Description
- Outputs Discrepancy Reports
- General Instructions Review the Class
Description and Requirements to make sure that
all appropriate concepts correspond between the
documents. - Specific Instructions
- Look for functionality that was described in the
Requirements, but omitted from the design. - Are there any nouns or verbs that were marked
that are not included in the design but should
be?
96State Diagrams X Requirements and Use-Cases
- The Artifacts
- The set of all State Diagrams, one for each
object - A set of Requirements that describe the concepts
and services that are necessary in the final
system. - The set of Use-cases that describe the important
concepts of the system. - The Goal
- To verify that the state diagrams describe
appropriate states of objects and events that
trigger state changes as described by the
requirements and use cases.
97State Diagrams X Requirements and Use-Cases
- Step 1 (For Each State Diagram)
- Inputs Requirements Description
- Outputs Object States, Adjacency Matrix
- General Instructions Read the requirements to
determine the possible states of the object,
which states are adjacent to each other, and the
events that cause the state changes. - Specific Instructions
- Find all requirements that this object
participates in. - Look for the states that are described in the
requirements. (This can be an attribute value, or
a combination of attribute values that cause the
object to behave in a certain way.) - Determine which state is the initial state
98State Diagrams X Requirements and Use-Cases
- For Parking Spot State Diagram
- Requirements excerpt
- 9. If a customer wishes to reserve a parking
spot he will provide his account number to the
cashier. The cashier will use the system to
search for an available spot. If an available
spot is found, it will be marked as not
available and returned to the cashier. The
customer has the same options for paying for as
parking spot as he does for paying for gasoline. - 10. When the customer is finished with the
parking spot, the cashier informs the system
that the spot is available again.
99State Diagrams X Requirements and Use-Cases
- Step 1 (For Each State Diagram)
- Inputs Requirements Description
- Outputs Object States, Adjacency Matrix
- General Instructions Read the requirements to
determine the possible states of the object,
which states are adjacent to each other, and the
events that cause the state changes. - Specific Instructions
- Find all requirements that this object
participates in. - Look for the states that are described in the
requirements. (This can be an attribute value, or
a combination of attribute values that cause the
object to behave in a certain way.) - Determine which state is the initial state and
which is the end state.
100State Diagrams X Requirements and Use-Cases
- For Parking Spot State Diagram
- Requirements excerpt
- 9. If a customer wishes to reserve a parking
spot he will provide his account number to the
cashier. The cashier will use the system to
search for an available spot. If an available
spot is found, it will be marked as not
available and returned to the cashier. The
customer has the same options for paying for as
parking spot as he does for paying for gasoline. - 10. When the customer is finished with the
parking spot, the cashier informs the system
that the spot is available again.
Initial State
101State Diagrams X Requirements and Use-Cases
- Step 1 (cont)
- On a separate sheet of paper, create an NxN
matrix, where N is the number of states
identified in the requirements. - For each pair of states, if the object can change
from the state represented by the number on the
left hand side, to the state represented by the
number across the top, put a mark in the box. If
you can determine what event causes this change,
then put that event in the box. - For any event written in the previous step, write
down any constraints on that event described in
the requirements.
102State Diagrams X Requirements and Use-Cases
103State Diagrams X Requirements and Use-Cases
- Step 1 (cont)
- On a separate sheet of paper, create an NxN
matrix, where N is the number of states
identified in the requirements. - For each pair of states, if the object can change
from the state represented by the number on the
left hand side, to the state represented by the
number across the top, put a mark in the box. If
you can determine what event causes this change,
then put that event in the box. - For any event written in the previous step, write
down any constraints on that event described in
the requirements.
104State Diagrams X Requirements and Use-Cases
- For Parking Spot State Diagram
- Requirements excerpt
- 9. If a customer wishes to reserve a parking
spot he will provide his account number to the
cashier. The cashier will use the system to
search for an available spot. If an available
spot is found, it will be marked as not
available and returned to the cashier. The
customer has the same options for paying for as
parking spot as he does for paying for gasoline. - 10. When the customer is finished with the
parking spot, the cashier informs the system
that the spot is available again.
Initial State
105State Diagrams X Requirements and Use-Cases
106State Diagrams X Requirements and Use-Cases
- Step 2
- Inputs Use Cases
- Outputs Completed Adjacency Matrix
- General Instructions Read the Use Cases to
determine the events that can cause the state
changes - Specific Instructions
- Find the Use Cases that contain the current
object - For each box in the Adjacency matrix that is
marked, examine the Use Cases and determine the
event that causes the state change. - For each box that is blank in the Adjacency
Matrix, see if there is an event described in the
Use Cases that could cause that change.
107State Diagrams X Requirements and Use-Cases
- Step 3
- Inputs Requirements, State Diagram, Adjacency
Matrix - Outputs Discrepancy Reports
- General Instructions Read the State Diagram to
determine if the states described are consistent
with the Requirements and if the transitions are
consistent with the Requirements and Use Cases. - Specific Instructions
- Find each state marked in the Requirements on the
State Diagram - Are all the states from the Requirements
represented in the State Diagram? - Are there extra states on the State Diagram that
were not described in the Requirements?
108State Diagrams X Requirements and Use-Cases
Discrepancy
109State Diagrams X Requirements and Use-Cases
- Step 3
- Compare the transition events marked on the
Adjacency Matrix to the transition events on the
State Diagram - Are all of the events from the Adjacency Matrix
present on the State Diagram? - Are there extra events on the State Diagram?
- Find each constraint marked on the Adjacency
Matrix on the State Diagram - Are all of the constraints from the Adjacency
Matrix described on the State Diagram? - Are there extra constraints on the State
Diagram?
110State Diagrams X Requirements and Use-Cases
Discrepancy