Message Analysis Table ©Ian Sommerville 2004 Slide 1

advertisement
Message Analysis Table
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide 11
Slide
Analysis Model -> Design Model
What we Have:
At this point in development we have the following:
1) a CLASS DIAGRAM that contains
DOMAIN classes
with attributes and some methods .
2) Interface Definitions and Navigation Matrix
3) Database Table Definitions
4) Use Cases Identified
and Use
Case Descriptions
Slide 22
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Design Classes
l
l
We HAVE
Analysis classes (domain classes) are those classes
identified during the analysis phase of the SDLC. They
are the classes recognized by the customers as residing
in their domain.
l
l
l
l
We NEED
Design classes are needed to implement this system in
the world of computing. These classes include various
types of classes.
Implementation classes are also needed to implement
the system in a particular language.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide 33
Slide
Design Classes
l
Design classes include:
•
•
•
•
•
•
Use Case Controller Classes
User Interface Classes
Database Table Classes
Classes for Patterns
Classes for Frameworks (not covered in this class)
Others
If we identify the classes that we will actually code.
The message analysis table, sequence diagram
and extended class diagram will help us do this.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide 44
Slide
Message Analysis Table
l
l
To begin the identification and description of these
classes, we construct a message analysis table.
A message analysis table is completed for EACH use
case. For our class only one per students will be turned
in for a grade.
l
l
The message analysis table is used to drive out the
needed design classes, their attributes, their methods,
and the messages needed to communicate between the
design classes.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide 55
Slide
Message Analysis Table
l
l
This lecture defines the steps for
creating the message analysis table.
It shows examples of how the diagram
is created and what you will derive out
of the activity that will help you to code
your software correctly.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide 66
Slide
Message Analysis Table
l
l
Step 1 Identify the use case in question
To begin a message analysis table, we need identify
which use case we are addressing.
Use Case Name
Use Case ID
Initiating Actor
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide 77
Slide
Message Analysis Table
l
Step 1 Identify the use case in question
l
VRS Register as Member
Use Case Name
Register As Member
Use Case ID
3
Initiating Actor
Customer
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide 88
Slide
Message Analysis Table
l
Step 2 Identify the use case controller class
The first design class will be the use case controller
Candidate Objects/Classes
class. Each use case usually has a controller class to
allow it to be called from another class. The standard
is naming it CtrUseCaseName.
l
Use Case
Controller
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide 99
Slide
Message Analysis Table
l
Step 2 Identify the use case controller class
VRS Register as Member
Candidate Objects/Classes
Use Case
Controller
©Ian Sommerville 2004
CtrRegisterAsMember
Software Engineering, 7th edition. Chapter 4
Slide
Slide 10
10
Message Analysis Table
l
l
Step 3 Identify the Domain Classes
The first classes we want to consider are those
domain classes on the class diagram.
Domain
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 11
11
Message Analysis Table
l
l
Step 3 Identify the Domain Classes
VRS Register As Member Domain Classes
Domain
Member
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 12
12
Message Analysis Table
l
l
Step 4 Identify the Database Classes
The second group of classes we wish to have are
those classes needed to contain the code to create,
reference,and update the data on the database.
Each table will have a database class.
Database Classes
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 13
13
Message Analysis Table
l
l
Step 4 Identify the Database Classes
VRS Register as Member Database Classes
Database Classes
TblMember
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 14
14
Message Analysis Table
l
l
Step 5 Identify the Screen and Report Classes
Each individual screen or report will have a class.
The navigation diagram for the use case should
contain those screens and reports.
Display Screens or Report
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 15
15
Message Analysis Table
l
l
Step 5 Identify the Screen and Report Classes
VRS Register as Member – Screens and Reports
Display Screens or Report
MemberApplicationScreen
NewUserNamePasswordScreen
ConfirmationScreen
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 16
16
Message Analysis Table
l
l
Step 6 Identify any other use cases
Identify any other use cases that are called or used
from this use case. For the VRS Register as
Member, there are none.
Other Use Cases
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 17
17
Message Analysis Table
l
l
Step 7 Identify any other use cases
Begin developing the messages.
First look at each step in the use case description.
For each step, determine in more detail what is
actually going to happen.
Then determine which of the classes will perform
that task and thus receive the message to complete
the tasks.
Slide
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide 18
18
Message Analysis Table
l
Step 1.Customer enters name, address, phone
number, email address, credit card number, and
expiration date of credit card.
Step #
Message Name
Owner Class Name
1
acceptMemberInformation
MembershipApplicationScreen
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 19
19
Message Analysis Table
l
Step 1.Customer enters name, address, phone
number, email address, credit card number, and
expiration date of credit card.
Step #
Message Name
Owner Class Name
1
acceptMemberInformation
MembershipApplicationScreen
The screens will accept information entered from the user.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 20
20
Message Analysis Table
l
Step 2. System Validates Member Information
Step #
Message Name
Owner Class Name
1
acceptMemberInformation
MembershipApplicationScreen
2
validateMembershipInformation
Member
The domain classes will validate its attribute data.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 21
21
Message Analysis Table
l
Step 3. Customer enters new user name
and password information
Step #
Message Name
Owner Class Name
1
acceptMemberInformation
MembershipApplicationScreen
2
validateMembershipInformation
Member
3
acceptUserNamePassword
NewUserNamePasswordScreen
Again the screen accepts information from the user.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 22
22
Message Analysis Table
l
Step 4. System Validates User Name and
Password
Step #
Message Name
Owner Class Name
1
acceptMemberInformation
MembershipApplicationScreen
2
validateMembershipInformation
Member
3
acceptUserNamePassword
NewUserNamePasswordScreen
4
validateUserNamePassword
Member, TblMember
The domain classes will validate its attribute data.
And the database will assure it is not a duplicate user name.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 23
23
Message Analysis Table
l
Step 5. Customer confirms membership
information.
Step #
Message Name
Owner Class Name
1
acceptMemberInformation
MembershipApplicationScreen
2
validateMembershipInformation
Member
3
acceptUserNamePassword
NewUserNamePasswordScreen
4
validateUserNamePassword
Member
5
acceptConfirmation
ConfirmationScreen
The screen accepts information from the user.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 24
24
Message Analysis Table
l
Step 5. Customer confirms membership
information.
Step #
Message Name
Owner Class Name
1
acceptMemberInformation
MembershipApplicationScreen
2
validateMembershipInformation
Member
3
acceptUserNamePassword
NewUserNamePasswordScreen
4
validateUserNamePassword
Member
5
acceptConfirmation
ConfirmationScreen
5
updateMembershipInformation
TblMember
The database table class creates a new entry.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 25
25
Message Analysis Table
l
Step 6. System emails membership
confirmation to member.
Step #
Message Name
Owner Class Name
1
acceptMemberInformation
MembershipApplicationScreen
2
validateMembershipInformation
Member
3
acceptUserNamePassword
NewUserNamePasswordScreen
4
validateUserNamePassword
Member
5
acceptConfirmation
ConfirmationScreen
6
emailMembershipConfirmation
Member
The domain class has the email address so a message is
sent to the member and it sends the email.
©Ian Sommerville 2004
Software Engineering, 7th edition. Chapter 4
Slide
Slide 26
26
Download