Академический Документы
Профессиональный Документы
Культура Документы
SEPTEMBER-2015
INDEX
S.NOCONTENTS
PAGENO
1. UML
1.1.Brief history
1.2.What is UML
1.3.CONCEPTUAL MODEL OF UML
BASIC BUILDING BLOCKS
RULES
COMMON MECHANISMS
2. Week 1
Find the following for a given application
2.1.Actors
2.2.Use cases with each actor
2.3.Extended or uses use cases (if applicable)
3. Week 2
Do the following for a given application
3.1.Identifying Scenarios from use case Dialog
3.2.Describing use case scenarios
3.3.Draw the complete use case diagram
4. Week 3
Do the following for a given application
4.1.Draw Entity Relation Diagram
4.2.Draw Data Flow Diagram
5. Week 4
Do the following for a given application
5.1.Write Flow of Events for any of 2 use cases from week 1
5.2.Draw Activity Diagram
6. Week 5
System Requirement Specification
6.1. Introduction
6.1.1. Characteristics of SRS
6.1.2. Problem Statement
7. Week 6
7.1.Draw Sequence Diagram for a given application
8. Week 7
Do the following for a given application
8.1.Draw Activity Diagram for a given application
9. Week 8
9.1.Draw state chart Diagram for a given application
10. Week 9
10.1.
Draw Component Diagram for a given application
STRUCTURAL THING
BEHAVIOURAL THINGS
ANNOTATIONAL THINGS
GROUPING THINGS
STRUCTURAL THINGS:
The structural things are nouns of UML model. There are seven kinds of
structural things.
a) CLASS
A class is a set of objects that share the same attributes, operations,
relationships and semantics.
Class Name
Attributes
Operations()
b) INTERFACE
An Interface is a collection of operations that specify a service of a class
or component
Student 1
c) COLLABORATION
Collaboration describes co-operative work of an element.
d) USE CASE
Use Case describes set of sequence of actions that a system performs
that yields an observable result of value to a particular actor.
UseCase
Actor
e) ACTIVE CLASS
Active class is just like a class but its elements are connected to other
class elements.
f) COMPONENT
Component represents physical packaging of logical elements like
classes, interfaces and collaborations.
Component
g) NODE
A Node is physical element that exists at run-time and having at least
some memory and processing capability.
Node
BEHAVIORAL THINGS
Behavioral Things are the verbs of UML representing behavior over
time and space. There are 2 kinds of Behavioral things
a) INTERACTION
Interaction is used to show communication between two objects
b) STATE MACHNE
State Machine specifies sequence of states of an object.
ANNOTATIONAL THINGS
Annotational Things are explanatory parts of UML. Only 1 type.
NOTE
Note is used to give comments to an element or collection of
elements.
Note
GROUPING THINGS
Grouping Things are the organizational parts of the model. Only one
type
PACKAGE
Package is a general purpose mechanism for organizing elements
or things into groups or packages.
Package
ii.
RELATIONSHIPS
There are 4 kinds of Relationships in the UML:
a) DEPENDENCY:
It is denoted by dashed line with an arrow.
MovieClip
name
screen()
start()
stop()
Dependency
Channel
b) ASSOCIATION:
It is denoted by a solid line.
____________________
Association is a structural relationship that describes a set of links, a
link being a connection among objects. Aggregation is a special kind of
association, representing a structural relationship between a whole and its
parts.
c) GENERALIZATION:
10
Generalization
Generalization is a relationship in which the child will share the behavior of
the parent.
Shape
origin : Integer
display()
Rectangle
length : Integer
breadth : Integer
Circle
radius : Integer
d) REALIZATION:
It is denoted by dashed lines with a hollow arrow head.
Realization is a relationship between classifiers, where one classifier specifies
a contract that another classifier guarantees to carry out
iii.
DIAGRAMS
There are 9 types of Diagrams in UML, which are classified into 2 types
11
Department
D_name : String
D_code : Integer
collect fees()
recruit faculty()
Staff
S_name : String
b) OBJECT DIAGRAM
An Object diagram shows a set of objects and their relationships. They
represent snapshots of instances of the things found in class diagrams.
C: College
name = "B.V.R.I.T"
location = "Narsapur"
D: Department
D_name = "CSE"
D_code : Integer = 05
collect fees()
recruit faculty()
S: Staff
S_name = "xyz"
c) COMPONENT DIAGRAM
A Component diagram shows the organizations and dependencies
among a set of components.
12
d) DEPLOYMENT DIAGRAM
A Deployment diagram shows the configuration of run-time processing
nodes and the components that are present in them.
A) USECASE DIAGRAM
A Use Case diagram shows a set of use cases and actors and their
relationships. An Actor can be a human or a system. The role of actor is
written below.
INTERACTION DIAGRAMS
An Interaction diagram shows an interaction, consisting of a set of
objects and their relationships, including the messages they exchange among
them.
2 types of Interaction diagrams are:
B) SEQUENCE DIAGRAM
13
A Sequence diagram is an interaction diagram that emphasizes the timeordering of messages. To show interaction between objects we use 3 types of
messages.
Simple Messages:
A Simple message shows how control is passed from one object to other
without describing communication in detail i.e. without indicating whether it
is synchronous or asynchronous message.
Synchronous Messages:
If sender object waits for a reply from receiver object from destination,
such messages are called Synchronous messages. Here, only one object can
send a message at a given instance of time.
Asynchronous Messages:
14
C)COLLABORATION DIAGRAM
A Collaboration diagram is an interaction diagram that emphasizes the
structural organization of the objects that send and receive messages.
3: fill form
5: check form
1: Request form
4: submit
S: Student
A: Admin
2: give form
6: eligible
15
E) ACTIVITY DIAGRAM
An activity diagram is a special kind of state chart diagram that shows
the flow from activity to activity within a system, which are connected by a
triggerless transition. We can check some conditions using decision box,
which is denoted by a diamond.
Activity: It is a major task that must take place in order to fulfill an operation
contract.
Initial Activity: This shows the starting point of the flow. It is denoted by
solid circle
16
Final Activity: This shows the end of the flow in the activity diagram. It is
denoted by a solid circle nested in a circle.
Decision Box: A point in an Activity diagram where a flow splits into several
mutually exclusive guarded flows. It has one incoming transition and two
outgoing transitions.
FORKING AND JOINING:We use synchronization bar to specify the forking and joining of parallel flows
of control.
A synchronization bar is a thick horizontal or vertical line.
A Fork may have one incoming transition and two or more outgoing
transitions, each of which represents an independent flow of control.
A Joinmay have two or more incoming transitions and one outgoing
transition.
Student
synchronization
bar
Forking
Listen
Watch
Joining
Success
SWIMLANES:
They are used to group related activities into one column.
2. RULES
There are 2 kinds of rules
1) Well formed rules
2) Less-well formed rules
1) WELL FORMED RULES:
These are of 5 types:
a)NAMES:What you call things, relationships, and diagrams
17
Specifications
Common Divisions
Adornments
Extensibility Mechanism
1. SPECIFICATIONS:
The first extension mechanism that was mentioned earlier is called
specifications. This is a very easy term to grasp as we all know what a
specification means in our everyday language. In the UML it is just as simple.
By using a specification, we are basically specifying something in a bit more
detail so that the role and meaning of the term being specified is presented to
us in a more clear and concise manner. For example, we can give a class a rich
specification by defining a full set of attributes, operations, full signatures, and
behaviors. We will then have a clearer notion of what the capabilities and
limitations of that class are. Specifications can be included in the class, or
specified separately
2.Common Divisions:
This is the second extension mechanism that is provided to us by the UML.
Common divisions are used in order to distinguish between two things that
might appear to be quite similar, or closely related to one another. There exist
18
two main common divisions: abstraction vs. manifestation and interface vs.
implementation. In the former, we mainly talk about the distinction between a
class and an object, where the class is an abstraction and the object is a clear
manifestation of that class. Most UML building blocks have this kind of
class/object distinction, e.g. use case, use case instance etc. In the second
common division interface vs. implementation we say that an interface
declares some kind of contract, or agreement, whereas an implementation
represents one concrete realization of that contract. The implementation is
then responsible for carrying out the interface
3.Adornments:
Adornments are textual or graphical items, which can be added to the basic
notation of a UML building block in order to visualize some details from that
elements specification. For example, let us consider association, which in its
most simple notation consists of one single line. Now, this can be adorned
with some additional details, such as the role and the multiplicity of each end.
19
It is worth mentioning that a note carries no semantic impact, i.e. the content
of a note does not in any way change the meaning or significance of the model
to which it is attached.
4. Extensibility Mechanisms:
The extensibility mechanisms allow you to customize and extend the UML by
adding new building blocks, creating new properties, and specifying new
semantics in order to make the language suitable for your specific problem
domain. There are three common extensibility mechanisms that are defined by
the UML: stereotypes, tagged values, and constraints.
Stereotypes:
Stereotypes allow you to extend the vocabulary of the UML so that you can
create new model elements, derived from existing ones, but that have specific
properties that are suitable for your problem domain. They are used for
classifying or marking the UML building blocks in order to introduce new
building blocks that speak the language of your domain and that look like
primitive, or basic, model elements. For example, when modeling a network
you might need to have symbols for representing routers and hubs. By using
stereotyped nodes you can make these things appear as primitive building
blocks. As another example, let us consider exception classes in Java or C++,
which you might sometimes have to model. Ideally you would only want to
allow them to be thrown and caught, nothing else. Now, by marking them with
a suitable stereotype you can make these classes into first class citizens in your
model; in other words, you make them appear as basic building blocks.
Stereotypes also allow you to introduce new graphical symbols for providing
visual cues to the models that speak the vocabulary of your specific domain
(see fig 4). Return copy of self Fig 2. Note 4 graphically, a stereotype is
rendered as a name enclosed by guillemots and placed above the name of
another element (see fig 3). Alternatively, you can render the stereotyped
element by using a new icon associated with that stereotype (see fig 4).
20
Tagged Values
Tagged values are properties for specifying keyword-value pairs of model
elements, where the keywords are attributes. They allow you to extend the
properties of a UML building block so that you create new information in the
specification of that element. Tagged values can be defined for existing model
elements, or for individual stereotypes, so that everything with that stereotype
has that tagged value. It is important to mention that a tagged value is not
equal to a class attribute. Instead, you can regard a tagged value as being a
metadata, since its value applies to the element itself and not to its instances.
One of the most common uses of a tagged value is to specify properties that
are relevant to code generation or configuration management. So, for example,
you can make use of a tagged value in order to specify the programming
language to which you map a particular class, or you can use it to denote the
author and the version of a component. As another example of where tagged
values can be useful, consider the release team of a project, which is
responsible for assembling, testing, and deploying releases. In such a case it
might be feasible to keep track of the version number and test results for each
main subsystem, and so one way of adding this information to the models is to
use tagged values. Graphically, a tagged value is rendered as a string enclosed
by brackets, which is placed below the name of another model element. The
string consists of a name (the tag), a separator (the symbol =), and a value (of
the tag) (see fig 6)
Constraints :
21
Constraints are properties for specifying semantics and/or conditions that must
be held true at all times for the elements of a model. They allow you to extend
the semantics of a UML building block by adding new rules, or modifying
existing ones. For example, when modeling hard real time systems it could be
useful to adorn the models with some additional information, such as time
budgets and deadlines. By making use of constraints these timing
requirements can easily be captured. Graphically, a constraint is rendered as a
string enclosed by brackets, which is placed near the associated element(s), or
connected to the element(s) by dependency relationships. This notation can
also be used to adorn a model elements basic notation, in order to visualize
parts of an elements specification that have no graphical cue. For example,
you can use constraint notation to provide some properties of associations,
such as order and changeability (see fig 7).
PROBLEM STATEMENT:
The online shortest path problem aims at computing the shortest path based on
live traffic circumstances. This is very important in modern car navigation
systems as it helps drivers to make sensible decisions. To our best knowledge,
22
Objective:
To the best of our knowledge, this is the first work to give a thorough cost
analysis on the hierarchical index techniques and apply stochastic process to
optimize the index hierarchical structure.
Purpose:
Our main purpose for this project is people invest their money to get
maximum profit and knowledge about our online trading system. Here all type
of user can go and analyses the data of different field and get maximum profit
for future investment.
Scope:
23
The scope of this project is to make user bid from anywhere any time.
Customer should have valid user-id and password to log into the system.
Admin can take back up of database for every auction that is happening.
WEEK-1
Find the following for a given application
1. Actors
2. Use cases with each actor
3. Extended or uses use cases (if applicable)
1.Actors
Actors found in the Online Auction System are: ADMIN, BUYER/SELLER
admin
Buyer/seller
24
login
assocation
Add /delete products
admin
View products
logout
register
assocation
Buyer/seller
login
Search/view product
Buy product
Sell Product
25
26
Prabhu:buyer/seller
<<
in
clu
de
s>
>
bu
27
28
Week 2
1. Identifying Scenarios from Use Case Dialog
2. Describing Use Case Scenarios
3. Finally draw the main use case diagram
29
Buy product
Primary Actor:
Buyer
Pre-condition:
Internet Connection
Main scenario:
Sell product
Primary Actor:
Seller
Pre-condition:
Main scenario
30
product.
4.Updates the information about the
product
Use case
Admin
Primary Actor:
Admin
Pre-condition:
Admin logged in
Main scenario
of
31
32
33
Week 3
1. Create an Entity Relationship Diagram (ERD) for a given application.
2. For a sample application create a Data Flow Diagram
1. Entity Relationship Diagram (ERD):
An entity-relationship diagram (ERD) is a data modeling technique that
graphically illustrates an information systems entities and the relationships
between those entities. An ERD is a conceptual and representational model of
data used to represent the entity framework infrastructure.
The elements of an ERD are:
Entities
Relationships
Attributes
Steps involved in creating an ERD include:
Identifying and defining the entities
Determining all interactions between the entities
Analyzing the nature of interactions/determining the cardinality of the
relationships
Creating the ERD
Symbols used in ER diagram are:
Entity
Attribute
Weak Entity
Key Attribute
34
1.C_id
2. Cname.
1.Pid
2. Pname
3. Description
1.Bid
2. Bname
1.Sid
2. Sname
ER DIAGRAM:
35
Pnamee
c_id
C_Name
P_id
Description
Participate bidding
Products
customer
Sname
Buyer
Seller
Sid
Feedback
Bid
Bname
Bid
PID
Product History
Feedback
PID
36
External Entity
The DFD may be used for any level of data abstraction. DFD can be
partitioned into levels. Each level has more information flow and data
functional details than the previous level.
37
38
39
WEEK-4
1. Take two of the use cases from week 1 application and write flow of
events for those.
2. Practice activity diagram from the example used.
1.Flow of events:
Registration
40
Primary Actor:
Seller/Buyer
Flow of Events
Entry-condition:
Exit-condition:
Quality Requirements
No internet connection
Connection lost at server
Good internet connection
Good server connection
2. Activity diagram:
41
Week 5
Write Software Requirement Specification (SRS) for a given application
SOFTWARE REQUIREMENT SPECIFICATION
42
1.1 INTRODUCTION:
Since the internet has become a popular place to buy and sell goods, online
auctioning services have made their way into most homes. On line auction system is web
based application, so the main advantage is that there is no more system compatibility
requirement problem. The main advantage of the online auction system is that the user can
have the varied classes for their investment, and through this system user can invest in their
own selected firm.
1.3.2 Purpose:
Our main purpose for this project is people invest their money to get maximum profit and
knowledge about our online trading system. Here all type of user can go and analyses the
data of different field and get maximum profit for future investment.
1.3.3 Scope:
This Project investigates the entry threshold for providing a new auction service channel
via the real options approach, where the entry threshold is established by using an Online
43
Customer must have a valid User Id and password to login to the system
After the valid user logs in he is shown the list of accounts he has with the bank.
On selecting the desired account he is taken to a page which shows the present
balance in that particular account number.and the details of what is latest auctions
are running currently.
1.3.3Overview:
This system provides an easy solution to users to buy or sell their product with maximum
profit online.
44
bidding process. The system uses HTTP forms authentication which creates a session cookie for any
signed in user. Throughout the span of the session the cookie remains valid until the user logs out.
An auction house needs to have products to auction, so in the proposed system this is done using
product registration module. The module is open to user who is registered sellers and they need to
authenticate before they register any product. The system controls the closing date by adding 14
days to the submitting date there by restricting the bidding process to go on indefinitely .
Another important module in the proposed project is the "Bidding module ". Here one can
see the details of any particular product and also the bidding history. The user can bid on
that item by entering any amount greater than or equal to the incremental bid amount. Here
also system checks to see whether the user has his credential verified otherwise he/she will
be directed
to
the
login/registration
page.
The last but the least module is the "Web Administration" module. The module is
only open to the web administrator due to security reasons. In this module the administrator
can add product categories; this is to avoid rampant creation of categories. The 2nd thing is
the option to edit any given product. This will be necessary when some of the details of the
product need to be edited for one reason or other. The 3rd and last the closed bid manager
where the administrator notifies both the seller and buyer the need to complete the
transaction.
There is another module which runs more or less like background process. The function of
the module is to close bid of those products whose closing date is less than the current date.
The process is automatic and hidden from the web users.
Product Functions
-
Customer must have a valid User Id and password to login to the system.
If a wrong password is given three times in succession, that account will be locked and
the customer will not be able to use it. When an invalid password is entered a warning is
given to the user that his account is going to get locked.
User can search the product he want and also in the particular price he wants i.emaximum and minimum price.
User can view his monthly as well as annual auctions. He can also view future auctions.
45
-
Administrator can take a back up of the database for every auction that is happening,
periodically.
details.
Manage Clients: The Administrator assigns new users when a new client joins
the online auctioning. Also he can delete an account when any of the user leave
the auctioning organization.
Maintain Corporate Details: The Administrator maintains entire details of the
Corporate that includes details of the Corporate Admin and its sub users details
etc.
Take System Backup: The Administrator Backup the database in order to
prevent loss of data on system crashes. He can backup entire database or a
particular section..
Generate Reports: : Responsible for checking the logs of different system
users for auditing and maintaining the integrity of the system.
2.5Nonfunctional requirements:
Usability:
Usability of the application can be of critical importance. As discussed above the user can
be of variety of needs. There should distinct categories, so as it becomes clear to user what
exactly he is looking for. Advanced search is of critical in this regard. Also it is important to
have a high performance (seed of website). If the system is live auction then the 'Client side
event handling' should be done with very advanced libraries and with great safety features.
There is separate article on Usability in this website.
Reliability:
The reliability percentage shown is based on the bids of the last 30 days. Only auctions that
have been confirmed to have been successfully won are counted as successes. Sometimes
46
an auction is successfully won but not confirmed as such by the system and incorrectly
counted as a failure. In other words, actual reliability can be higher than the percentage
shown but never lower. All bid failures are investigated to find the cause and prevent the
failure from occurring again to improve reliability. Bids that fail for reasons such as being
outbid, having an invalid username or password or being blocked from bidding by the seller
or by eBay are not counted as failures.
Performance:
The effectiveness of the bidder agents will depend on the proportion of time that their price
information is accurate. Maintaining such accurate information places stringent
performance requirements on the underlying infrastructure. Moreover the scalability of
such systems, in terms of the number of bidder agents that can be satisfactorily
accommodated, could be severely limited by the performance of the network. From the
point of view of accessibility it is important that such auction systems use existing
infrastructure, i.e. the Internet, and so the ability to directly address performance problems
may be limited. However, in this paper we consider how such performance limitations may
be circumvented, by incorporating active nodes within the network
Supportability:
One user can do a more than one bid on products. After completion of bidding process all
the bids are check and the product will give to that customer for purchase who has a high
bid price. The bidding exercise will have a specified opening and closing time. The EAuction will close when no new bids are received and the closing time has expired. If
however, a new (lower) bid is received just before the Scheduled closing time, the allocated
bidding time will be extended. User can also give their feedbacks about on this project.
There would be Three type of feedback which user can give they would be negative,
positive.
Implementation:
Implementation includes all those activities that take place to convert from the old system
to the new. The old system consists of manual operations, which is operated in a very
different manner from the proposed new system. A proper implementation is essential to
provide a reliable system to meet the requirements of the organizations. An improper
installation may affect the success of the computerized system. The implementation plan
includes a description of all the activities that must occur to implement the new system and
to put it into operation. It identifies the personnel responsible for the activities and prepares
a time chart for implementing the system.
Interface:
47
Application is broken into three separate logical layers, each with a well - defined set of
interfaces. The first tier is referred to as the presentation layer and typically consists of
graphical user interface of some kind. The middle tier, or business layer, consists of
application or business layer and the third layer- the data layer contains the data that is
needed for the application. The middle tier is basically the code that the user calls upon to
retrieve the desired data. The presentation layer then receives the data and formats it for
display. This separation of application logic from the user interface adds enormous
flexibility to the design of application. The third tier contains the data that is needed for the
application.
3.1 SCENARIOS:
Buy product
Primary Actor:
Buyer
Pre-condition:
Internet Connection
Main scenario:
Sell product
Seller
Internet Connection and Registration
Main scenario
48
Sell product
Seller
Internet Connection and
Registration
1. Seller enters into the system with
the id provide while registration
(login).
2. Add product in to the system
3. Add information and details about
the product.
4.Updates the information about the
product
49
actors.A use case diagram summarizes who uses our application or system and what
they can do with it.
By use case model we can achieve:
The scenario in which our application interacts with people, organizations or
external systems.
The goals that it helps those actors to achieve.
The scope of our system.
WE MAINLY DISCUSS ABOUT USE CASE DIAGRAM IN USE CASEMODEL
50
Software Interfaces
-
User on Internet
Application Server
: WAS
: DB2
Network
: Internet
Development Tools
Communication Interfaces
-
Hardware interfaces
-
Processor
: Pentium 3 or above
Clock speed
: 800Mhz
System bus
: 32 bit
HDD : 40 GB
Monitor
: SVGA color
Keyboard
: 101 Keys
Modem
: 56 Kbps/ADSL broadband
Mouse : PS2/serial
FDD : 1.44 MB
51
Week 6
Build Sequence diagrams from the Scenarios
SEQUENCE DIAGRAM:
52
53
Week 7
Build an Activity Diagram from a Use Case Narrative
54
Step-2:Checks the validity of the ID and password , if valid then the user
may be Buyer or Seller
Step-3:If the user is Seller then he post the product and add discription
about the product
Step-4:If the user is Buyer then he search the product checks the
avaliability
Step-5:If the product is avaliable then he bid with high value
Step-6:Seller and Buyer will communicates with each other about the
product
55
Week 8
Build a State Chart Diagrams from Sequence Diagrams
STATE CHART DIAGRAM:
56
57
Week 9
Think about any system and its components and draw
1 Deployment diagram.
2.Component diagram.
1.DEPLOYMENT DIAGRAM:
The nodes appear as boxes, and the artifacts allocated to each node appear as
rectangles within the boxes. Nodes may have sub nodes, which appear as
nested boxes. A single node in a deployment diagram may conceptually
represent multiple physical nodes, such as a cluster of database servers.
There are two types of Nodes:
1. Device Node
58
2.COMPONENT DIAGRAM:
59
WEEK-10
ARENA CASE STUDY
In this section, we apply the concepts and methods described in this chapter to the ARENA
system.We start with the use case model and the glossary developed in the previous chapter.
We identifyparticipating entity, boundary, and control objects, and refine them by adding
attributes andassociations to the analysis object model. Finally, we identify inheritance
relationships and
consolidate the analysis object model. In this section, we focus primarily on the
AnnounceTournament use case.
5.6.1 Identifying Entity Objects
Entity objects represent concepts in the application domain that are tracked by the system.
We
use the glossary produced during elicitation as a starting point for identifying entity objects
in
ARENA. We identify additional entity objects and their attributes by applying Abbotts
heuristics
on the use cases. We initially focus only on noun phrases that denote concepts of the
application
domain. Figure 5-23 depicts the AnnounceTournament use case with the first occurrence of
noun
phrases we identified in bold.
Note that we identify entity objects corresponding to actors in the use case model. Actors
are concepts in the application domain and are relevant to the system (e.g., for access
control or
60
61
62
63
64
The identification of entity objects and their related attributes usually triggers additional
questions for the client. For example, when we identify implicit attributes and associations,
we
should double-check with the client to confirm whether our intuition was correct. In other
cases,
the ends of an association are ambiguous. We collect all the questions generated by the
identification of objects and go back to the client (or the domain expert). Figure 5-24
depicts the
questions we have after identifying entity objects participating in the AnnounceTournament
use
case.
65
66
Note that AnnounceTournament is a relatively complex use case involving several actors.
This yields a relatively large number boundary objects. In practice, a use case can have as
few as
a single boundary object to represent the interface between the initiating actor and the
system. In
all cases, however, each use case should have at least one participating boundary object
(possibly shared with other use cases).
67
Advertisers, checking resource availability, and, finally, notifying interested users. Note
that,
in the general case, several control objects could participate in the same use case, if, for
example, there are alternate flows of events to be coordinated, multiple workstations
operating
asynchronously, or if some control information survives the completion of the use case.
5.6.4 Modeling Interactions Among Objects
We have identified a number of entity, boundary, and control objects participating in the
AnnounceTournament use case. Along the way, we also identified some of their attributes
and
associations. We represent these objects in a sequence diagram, depicting the interactions
that
occur during the use case to identify additional associations and attributes.
In the sequence diagram, we arrange the objects we identified along the top row. We place
left-most the initiating actor (i.e., LeagueOwner), followed by the boundary object
responsible
for initiating the use case (i.e., TournamentForm), followed by the main control object (i.e.,
AnnounceTournamentControl), and the entity objects (i.e., Arena, League, and
Tournament).
Any other participating actors and their corresponding boundary objects are on the right of
the
diagram. We split the sequence diagram associated with AnnounceTournament into three
figures
for space reasons. Figure 5-26 depicts the sequence of interactions leading to the creation of
a
tournament. Figure 5-27 depicts the workflow for requesting and selecting an exclusive
sponsor.
Figure 5-28 focuses on the notification of interest groups.
The sequence diagram in Figure 5-26 is straightforward. The LeagueOwner requests the
creation of the tournament and specifies its initial parameter (e.g., name, maximum number
of
68
first obtain a list of interested sponsors. It requests it from the Arena class, which maintains
the
list of interested sponsors. This entails that the Arena class maintains at all times the list of
all
Advertisers, so that it can return this list to the AnnounceTournamentControl object (or
control
objects for other use cases that require the list of all Advertisers). To notify an Advertiser,
we
also may need contact information, such as E-mail address, or we may need to create a
mailbox
69
for notices within ARENA. Consequently, we add an contact attribute to the Advertiser
class,
which initially stores the E-mail address of the Advertiser until further devices are
supported.
Anticipating similar needs for other actors, we also add contact attributes to the
LeagueOwner
and Player classes.
When constructing the sequence diagram for notifying interest groups (Figure 5-28), we
realize that the use case does not specify how the selected sponsor is notified.
Consequently, we
add a step in the use case to notify all sponsors who replied about the sponsorship decisions
before interest groups are notified. This requires the identification of a new boundary
object,
SponsorNotice. The rest of the interaction does not yield any new discovery, as we already
anticipated the need for the InterestGroup and the InterestGroupNotice classes.
5.6.5 Reviewing and Consolidating the Analysis Model
Now that we have identified most participating objects, their associations, and their
attributes,
we draw UML class diagrams documenting the results of our analysis so far. As we have
identified many objects, we use several class diagrams to depict the analysis object model.
We
Figure 5-26 UML sequence diagram for AnnounceTournament, tournament creation
workflow.
70
71
use these class diagrams as a visual index into the glossary we developed. Although we
should
not expect the client or the users to be able to review class diagrams, we can use class
diagrams
for generating more questions for interviews with the client.
We first focus on the entity objects, since these need to be carefully reviewed by the client
as they represent application domain concepts (Figure 5-29). Note that we use the Arena
class as
a root object in the system; the Arena class represents a specific instantiation. For example,
given an instantiation, it is possible to get a list of all InterestGroups, Advertisers,
LeagueOwners, Games, and TournamentStyles by querying the Arena class. Moreover, note
that
objects are not shared among instantiations. For example, LeagueOwners belong to exactly
one
instantiation of the system. If a user is a LeagueOwner in several ARENA instantiations of
the
system, she holds a LeagueOwner account in each instantiation. We make these type of
choices
during analysis based on our interpretation of the problem statement, based on our
experience,
and based on resources available to build in the system. In all cases, these decisions need to
be
reviewed and confirmed by the client.
Next, we draw a class diagram depicting the inheritance hierarchies (Figure 5-30).
Although UML allows inheritance relationships and associations to coexist in the same
diagram,
it is good practice during analysis to draw two separate diagrams to depict each type of
72
relationship. First, the UML symbols used to denote each type are similar and easily
confused.
73
Second, analysts usually focus on inheritance and associations at different times. We will
see
later, in Chapters 6 through 10, that this is not the case during system design and object
design,
where it is often necessary to consider both relationships to understand how different
classes are
related.
Figure 5-30 shows three inheritance hierarchies. First, we identified an abstract class User
through generalization. This enables us to treat common attributes of various users in a
more
general fashion, including contact information and registration procedures. Note that in the
problem statement and in the use cases, we already used the term user, so we are simply
formalizing a concept that was already in use. We identified two other inheritance
hierarchies,
Game and TournamentStyle, identified through specialization to provide examples for both
concepts and to provide traceability to the problem statement. The TicTacToe and the Chess
classes are concrete specializations of Game that embody rules for the games called tic tac
toe
and chess, respectively. The KnockOutStyle and the RoundRobinStyle classes are
concrete
specializations of the TournamentStylethat provide algorithms for assigning Players to
knockout
tournaments (in which players need to win to remain in the tournament) and round robin
tournaments (in which each player plays all other players exactly once), respectively.
Finally, we draw a class diagram that depicts the associations among the boundary,
control, and selected entity objects associated with the use case (Figure 5-31). To generate
this
diagram from the sequence diagrams, we draw the equivalent communication diagram, with
the
control object to the left, the boundary objects in the center, and the entity objects on the
right.
74
We then replace the iterations with associations, where necessary, so that the objects in the
workflow can carry send messages to objects depicted in the sequence diagrams. We then
add
navigation to the associations to denote the direction of the dependencies: control and
boundary objects usually know about each other, but entity objects do not depend on any
control or
boundary objects.
Whereas the class diagram in Figure 5-29 focused primarily on the relationships among
application domain concepts, the class diagram of Figure 5-31 focuses on the concepts
associated with workflow of the use case at a coarse level. The control object acts as the
glue
among boundary and entity objects, since it represents the coordination and the sequencing
among the forms and notices. As indicated in the sequence diagrams in Figures 5-26
through
5-28, the control object also creates several of the boundary objects. The class diagram in
Figure 5-31 provides a summary of the objects participating in the use case and the
associations
traversed during the use case. However, the sequence diagrams provide the complete
sequencing
information of the workflow.
75
76