Web Tech Lab Record: DFD 651
Web Tech Lab Record: DFD 651
LAB MANUAL
Web Technology Lab
(BCS-552)
Name
Batch / Section
Session
1. To provide quality education and enhance skills of the students to make them useful
for the society and industries.
2. To provide environment for Research & Development, innovation and incubation
3. To enhance values and ethics among the students to produce socially responsible
Scholars and Technocrats
2
DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING
3
PROGRAM OUTCOMES
Engineering Graduates will be able to:
POs Statement
Engineering knowledge: Apply the knowledge of mathematics, science,
PO1 engineering fundamentals, and an engineering specialization to the solution of
complex computer engineering problems.
Problem analysis: Identify, formulate, review research literature, and analyse
PO2 complex computer engineering problems reaching substantiated conclusions using
first principles of mathematics, natural sciences, and engineering sciences.
Design/development of solutions: Design solutions for complex computer
engineering problems and design system components or processes that meet the
PO3
specific needs with appropriate considerations for the public health and safety, and
the cultural, societal, and environmental considerations.
Conduct investigations of complex problems: Use research-based knowledge and
PO4 research methods including design of experiments, analysis and interpretation of
data, and synthesis of the information to provide conclusions
Modern tool usage: Create, select, and apply appropriate techniques, resources, and
PO5 modern engineering and IT tools including prediction and modelling to complex
engineering activities with an understanding of the limitations
The engineer and society: Apply reasoning informed by the contextual knowledge
PO6 to assess societal, health, safety, legal and cultural issues and the consequent relevant
to the professional engineering practices
Environment and sustainability: Understand the impact of the professional
PO7 engineering solutions in societal and environmental contexts, and demonstrate the
knowledge of, and need for sustainable development
Ethics: Apply ethical principles and commit to professional ethics and
PO8
responsibilities and norm of the engineering practices
Individual and team work: Function effectively as an individual, and as a member
PO9
or leader in diverse teams, and in multidisciplinary settings
Communications: Communicate effectively on complex engineering activities with
the engineering community and with society at large, such as, being able to
PO10
comprehend and write effective reports and design documentation, make effective
presentations, and give and receive clear instructions
Project management and finance: Demonstrate knowledge and understanding of
the engineering and management principles and apply these to one’s own work, as a
PO11
member and leader in a team, to manage projects and in multidisciplinary
environments.
Life-long learning: Recognize the need for, and have the preparation and ability to
PO12 engage in independent and life learning in the broadest context of technological
change.
4
GENERAL LABORATORY INSTRUCTIONS
1. Students are advised to come to the laboratory at least 5 minutes before (to the starting time), those
who come after 5 minutes will not be allowed into the lab.
2. Plan your task properly much before to the commencement, come prepared to the lab with the
synopsis / program / experiment details.
Laboratory observation notes with all the details (Problem statement, Aim,
Algorithm,Procedure, Program, Expected Output, etc.,) filled in for the lab session.
Laboratory Record updated up to the last session experiments and other utensils (if
4. Sign in the laboratory login register, write the TIME-IN, and occupy the computer system allotted
to you by the faculty.
5. Execute your task in the laboratory, and record the results / output in the lab observation note book,
and get certified by the concerned faculty.
6. All the students should be polite and cooperative with the laboratory staff, must maintain the
discipline and decency in the laboratory.
7. Computer labs are established with sophisticated and high-end branded systems, which should be
utilized properly.
8. Students / Faculty must keep their mobile phones in SWITCHED OFF mode during the lab
sessions. Misuse of the equipment, misbehaviors with the staff and systems etc., will attract severe
punishment.
9. Students must take the permission of the faculty in case of any urgency to go out; if anybody found
loitering outside the lab / class without permission during working hours will be treated seriously
and punished appropriately.
10. Students should LOG OFF/ SHUT DOWN the computer system before he/she leaves the lab after
completing the task (experiment) in all aspects. He/she must ensure the system / seat is kept
properly.
4
INDEX
DATE OF FACULTY
[Link] TITLE OF THE EXPERIMENT SUBMISSION SIGNATURE
12 References
5
STUDY AND EVALUATION SCHEME
Course
Course Name Periods Evaluation Scheme End Semester
Code
Total Credit
Software L T P CT TA Total PS TE PE
KCS-651
Engineering
(P)
Lab 00 00 02 00 01 00 25 25 50 1
6
BHARAT INSTITUTE OF TECHNOLOGY
NH58 Bypass, Partapur, Meerut, UP, India
Department of Computer Science and Engineering
Bloom’s
COURSE OUTCOMES Level
Identify different actors and use cases from a given problem statement and draw use
CO2 K3, K5
case diagram to associate use cases with different types of relationship
CO3 Draw a class diagram after identifying classes and association among them K4, K5
Graphically represent various UML diagrams, and associations among them and
CO4 identify the logical sequence of activities undergoing in a system, and represent them K4, K5
pictorially
Able to use modern engineering tools for specification, design, implementation and
CO5 K3, K4
testing
CO-PO Matrix
Course PO 1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2
Outcome
CO1 3 2 3 3 3 1 - - - - 3 3 3 3
CO2 3 3 3 3 2 1 1 - - - 1 3 2 3
CO3 3 3 3 3 3 1 1 - - - 1 2 2 2
CO4 3 3 2 2 2 1 1 - - - 1 2 3 2
CO5 3 3 3 3 3 1 1 - - - 1 3 2 2
7
LIST OF PROGRAMS
MAPPING
[Link]. NAME OF EXPERIMENT WITH CO
&
PO’s
CO1, PO1,
1. To Develop requirement specification for given problem. PO2, PO3,
PO4, PO5, PO6
CO2, PO1,
PO2, PO3,
2. To Develop DFD model (level-0, level-1 and data dictionary)
PO4, PO5,
PO6, PO7
CO2, PO1,
PO2, PO3,
3. To Develop Use Case model for a problem
PO4, PO5,
PO6, PO7
CO2, PO1,
PO2, PO3,
4. To Develop Sequence diagram for a specific problem PO4, PO5,
PO6, PO7
CO3, PO1,
PO2, PO3,
5. To Develop Class diagram for a problem PO4, PO5,
PO6, PO7
CO3, PO1,
PO2, PO3,
6. Draw the collaboration diagram
PO4, PO5,
PO6, PO7
CO4, PO1,
PO2, PO3,
7. Draw the state chart diagram PO4, PO5,
PO6, PO7
CO4, PO1,
Draw the component diagram PO2, PO3,
8.
PO4, PO5,
PO6, PO7
CO5, PO1,
PO2, PO3,
9. Draw the deployment diagram
PO4, PO5,
PO6, PO7
CO5, PO1,
PO2, PO3,
10. Draw the activity diagram
PO4, PO5,
PO6, PO7
CO5, PO1,
PO2, PO3,
11. Draw the communication diagram
PO4, PO5,
PO6, PO7
12. References Page No-62
8
EXPERIMENT NO. – 1
AIM: To Develop requirement specification for given problem CO1, PO1, PO2,
PO3, PO4, PO5,
PO6
Description:
A software requirements specification (SRS) is a document that captures complete description about how the
system is expected to perform. It is usually signed off at the end of requirements engineering phase. Software
requirements specification establishes the basis for an agreement between customers and contractors or
suppliers (in market-driven projects, these roles may be played by the marketing and development divisions)
on what the software product is to do as well as what it is not expected to do.
Pre-experiment Questions:
1. What is SRS?
2. Differentiate b/w Software Specification and System Specifications?
9
3. User Classes and Characteristics: Identify the various user classes that you anticipate will use this prod
uct. User classes may be differentiated based on frequency of use, subset of product functions used, tech
nical expertise, security or privilege levels, educational level, or experience. Describe the pertinent chara
cteristics of each user class.
4. Operating Environment: Describe the environment in which the software will operate, including the ha
rdware platform, operating system and versions, and any other software components or applications with
which it must peacefully coexist.
5. Design and Implementation Constraints: Describe any items or issues that will limit the options
available to the developers. These might include: corporate or regulatory policies; hardware
limitations(timing requirements, memory requirements); interfaces to other applications; specific
technologies, tools, and d databases to be used; parallel operations; language requirements;
communications protocols; security cons iterations; design conventions or programming standards).
Step 3:
1. System Features: This template illustrates organizing the functional requirements for the product by s
ystem features, the major services provided by the product. You may prefer to organize this section by
use case, mode of operation, user class, object class, functional hierarchy, or combinations of these, wh
ether makes the most logical sense for your product.
2. Description and Priority: Provide a short description of the feature and indicate whether it is of High,
Medium, or Low priority. You could also include specific priority component ratings, such as benefit,
penalty, cost. List the sequences of user actions and system responses that stimulate the behavior
define d for this feature. These will correspond to the dialog elements associated with use cases.
3. Functional Requirements: Itemize the detailed functional requirements associated with this feature.
These are the software capabilities that must be present in order for the user to carry out the services pr
ovided by the feature, or to execute the use case, include how the product should respond to anticipate
d error condition or invalid inputs. Requirements should be concise, compete, unambiguous, verifiable
, and necessary.
Step 4:
1. External Interface Requirements
1.1. User Interfaces: Describe the logical characteristics of each interface between the software produc
t and the users. This may include sample screen images, any GUI standards or product family style gui
des that are to be followed, screen layout constraints, standard buttons and function ([Link] )that will
appear on every screen, keyboard shortcuts, error message display standards, and so on.
1.2. Hardware Interfaces: Describe the logical and physical characteristics of each interface between
t he software product and the hardware components of the system. This may include the supported
10
devic
11
e types, the nature of the data and control interactions between the software and the hardware, and com
munication protocols to be used.
1.3. Software Interfaces: Describe the connections between this product and other specific software c
omponents (name and version), including databases, operating systems, tools, libraries, and integrated
commercial components. Identify the data items or messages coming into the system and going out and
describe the purpose of each. Describe the services needed and the nature of communications.
1.4. Communication Interface: Describe the requirements associated with any communications functi
ons required by this product, including e-mail, web browser, and network saver communications pro
tocols. Electronic forms, and so on.
2. Nonfunctional Requirements
2.1 Performance Requirements: There are performance requirements for the product under various circu
mstances, state them here and explain their rationale, to help the developers understand the intent and
make suitable design choices. Specify the timing relationships for real time systems. Make such require
ments as specific as possible.
2.2 Safety Requirements: Specify thaw requirements that are concerned with possible loss, damage, or ha
rm that could result from the use of the product. Define any safeguards or actions that must be taken, as
well as actions that must be prevented.
2.3 Security Requirements: Any requirements regarding security or privacy issues surrounding use of the
product or protection of the data used or created by the product. Define any user identity authentication
requirements.
2.4 Software Quality Attributes: Specify any additional quality characteristics for the product that will be
important to either the customers or the developers. Some to consider are adaptability, availability, corr
ectness, flexibility, interoperability, maintainability, portability, reliability, reusability, robustness, testa
bility, and usability.
Post-experiment Questions:
1. What are the characteristics of good SRS?
2. What should the SRS address?
12
EXPERIMENT NO. 2
AIM: To Develop DFD model (level-0, level-1 and data dictionary) of CO2, PO1, PO2,
the project PO3, PO4, PO5,
PO6, PO7
Description: Enter and leave the system? Data analysis attempts to answer four specific questions:
1. What processes make up a system?
2. What data are used in each process?
3. What is data?
Data drive business activities and can trigger events (e.g. new sales order data) or be processed to provide
information about the activity. Data flow analysis. as the name suggests, follows the flow of data through
business processes and determines how organization objectives are accomplished. In the course of handling
transactions and completing tasks, data are input, processed. Stored, retrieved, met changed and stored output.
Data flow analysis studies the use of data in each activity and documents the findings in data flow diagrams,
graphically showing the relation between processes and data.
Pre-experiment Questions:
1. What is DFD?
2. What are the types of DFD’s?
Procedure:
Physical and Logical DFDs: There are two types of data flow diagrams, namely physical data flow diagram a
nd logical data flow diagrams and it is important to distinguish clearly between the two:
Physical Data Flow Diagrams: An implementation-dependent view of the current system, showing what task s
are carried out and how they are performed. Physical characteristics can include: Names of people, Form and
document names or numbers Names of departments, Master and transaction files, Equipment and devices
used as shown in Fig. 2.1
Logical Data Flow Diagrams
An implementation-independent view of the system, focusing on the flow of data between processes without
regard for the specific devices, storage locations or people in the system. The physical characteristics listed
above for physical data flow diagrams will not be specified.
13
Fig. 2.1 DFD
Data Flow Diagram (DFD): The DFD (also known as a bubble chart) is a hierarchical graphical model of a s
ystem that shows the different processing activities or functions that the system performs and the data intercha
nge among these functions. Each function is considered as a processing station (or process) that consumes
som e input data and produces some output data. The system is represented in terms of the input data to the
system. Various processing carried out on these data, and the output data generated by the system. A DFD
model uses a very limited number of primitive symbols (as shown in figure below) to represent the functions
performed by a system and the data flow among these functions.
14
Items
15
dl and d3 flow out of the bubble 0.1 and the data item d2 flows P1O. I. In the next level, bubble 0.1 is
decomp osed. The d23 flow out of the level 2 diagram and d2 flows as shown in Fig. 2.4
16
lower DFD levels. If a system has less than three high-level functional requirements then some of them need
to be split into their sub-functions so that we have roughly about 5 to 7 bubbles on the diagram.
Decomposition: Each bubble in the DFD represents a function performed by the system. The bubbles are deco
mposed into sub-functions at the successive levels of the DFD.
Decomposition of a bubble is also known as factoring or exploding a bubble. Each bubble at any level of DFD
is usually decomposed to anything between 3 to 7 bubbles. Too few bubbles at any level make that level
superfluous. For example, if a bubble is decomposed to just one bubble or two bubbles, then this
decomposition becomes redundant. Also, too many bubbles, i.e. more than 7 bubbles at any level of a DFD
makes the DFD model hard to understand. Decomposition of a bubble should be carried on until a level is
reached at which the function of the bubble can be described using a simple algorithm.
Numbering of Bubbles: It is necessary to number the different bubbles occurring in the DFD. These numbers
help in uniquely identifying any bubble in the DFD by its bubble number. The bubble at the context level is us
ually assigned the number 0 to indicate that it is the 0 level DFD. Bubbles at level 1 are numbered, 0.1, 0.2,
0.3
, etc, etc. When a bubble numbered x is decomposed, its children bubble are numbered x.1, xi, x.3, etc. In this
numbering scheme, by looking at the number of a
bubble we can unambiguously determine its level, its ancestors, and its successors.
Example:-
Supermarket needs to develop the following software to encourage regular customers. For this, the customer
needs to supply his/her residence address, telephone number, and the driving license number. Each customer
who registers for this scheme is assigned a unique customer number (CN) by the computer. A customer can
present his CN to the check-out staff when he makes any purchase. In this case, the value of his purchase is
credited against his CN. At the end of each year, the supermarket intends to award surprise gifts to 10
customers who make the highest total purchase over the year. Also, it intends to award a 22-carat gold coin to
every customer whose purchase exceeded Rs.10,000. The entries against the CN are the reset on the day of
every year after the prize winners' lists are generated as shown in Fig. 2.5, Fig. 2.6 and Fig. 2.7.
17
Fig. 2.5 Context diagram for supermarket problem
18
Fig. 2.7 Level-2 Diagram of supermarket problem
Post-Experiment Questions:
1. What are DFD components?
2. Differentiate level-0, level-1 and level-2 DFDs.
19
EXPERIMENT NO. 3
AIM: To Develop Use Case model for a problem CO2, PO1, PO2,
PO3, PO4, PO5,
PO6, PO7
Description: To model a system the most important aspect is to capture the dynamic behavior. To clarify a bit in
details, dynamic behavior means the behavior of the system when it is running /operating. So only static beh
avior is not sufficient to model a system rather dynamic behavior is more important than static behavior. In U
ML there are five diagrams available to model dynamic nature and use case diagram is one of them. Now as w
e have to discuss that the use case diagram is dynamic in nature there should be some internal or external facto
rs for making the interaction. These internal and external agents are known as actors. So, use case diagrams are
consists of actors, use cases and their relationships. The diagram is used to model the system/subsystem of an
a pplication. A single use case diagram captures a particular functionality of a system. So, to model the entire
sy stem numbers of use case diagrams are used.
Pre-Experiment Questions:
1. What are functional requirements?
2. What is USE CASE Diagram?
20
Step2: Enter name for the newly created use case diagram in the text field of pop-up box on the top left
corner as shown in Fig. 3.2.
21
Step 4: Drawing an actor
To draw an actor, select Actor on the diagram toolbar and then click it on the diagram pane. Finally. name the
newly created actor when it is created.
22
Drawing <<Include>> relationship. To create an include relationship. mouse over a use case and press its
resource icon Include -> Use Case. Drag it to your preferred place and then release the mouse button. A new
use case together with an include relationship is created. Finally, name the newly created use case as shown in
Fig. 3.8.
23
example. when digit is 3. ID "1" will become Digits. Suffix The suffix you enter in Suffix text field will be
inserted behind the number. Options for formatting ID
Showing ID on diagram
By default, ID is just a text property. It usually doesn't appear on diagram. However, you can make it shown
within a use case. Right click on the diagram background, select Presentation Options and the specific model
element display option from the pop-up menu as shown in Fig. 3.13.
NOTE: The feature of showing ID does only support for use case, but not for actor.
ID assignment
There are several ways that you can assign an ID to a model element, including:
Through the specification dialog box (Right click on the selected model element and select Open
24
Specification. from the pop-up menu)
Right click on a use case and select Model Element Properties > Business Model from the pop-up menu
Step 15:
1. Click Business model
2. After selected, an extra slash will be shown on the left edge of the use case as shown in Fig. 3.15.
EXPERIMENT NO. 4
AIM: To Develop Sequence diagram for a specific problem CO2, PO1, PO2,
PO3, PO4, PO5,
PO6, PO7
Description:
From the name Interaction it is clear that the diagram is used to describe some type of interactions among the
different elements in the model. So, this interaction is a part of dynamic behavior of the system. This
interactive behavior is represented in UML by two diagrams known as Sequence diagram and Collaboration
diagram. The basic purposes of both the diagrams are similar. Sequence diagram emphasizes on time sequence
of messages and collaboration diagram emphasizes on the structural organization of the objects that send and
receive messages.
25
Pre-Experiment Questions:
Step 1: Right click Sequence diagram on Diagram Navigator and select New Sequence Diagram from the
pop- up menu to create a sequence diagram as shown in Fig. 4.1.
26
Click on the Message -> Lifeline resource beside an actor/lifeline and drag as shown in Fig. 4.2b.
27
Step 4:
Using sweeper and magnet to manage sequence diagram. Sweeper helps you to move shapes aside to
make room for new shapes or connectors. To use sweeper, click Sweeper on the diagram toolbar (Under
the tool category) as shown in Fig. 4.4a.
Step 5:
You can also use magnet to pull shapes together. To use magnet, click Magnet on the diagram toolbar (under
the Tools category) as shown in Fig. 4.5. The picture below shows when drag the magnet upwards, shapes
below dragged position are pulled upwards.
28
Fig. 4.5 Step5 of Sequence Diagram
Step 6: Creating combined fragment for messages
To create combined fragment to cover messages, select the messages. right-click on the selection and
select Create Combined Fragment. and then select a combined fragment type (e.g. loop) from the popup
menu as shown in Fig. 4.6.
Step 7:
A combined fragment of selected type will be created to cover the messages as shown in Fig. 4.7.
29
Fig. 4.7 Step7 of Sequence Diagram
Step 8:
Adding/removing covered lifelines
After you've created a combined fragment on the messages. you can add or remove the covered lifelines. Move
the mouse over the combined fragment and select Add/Remove
In the Add/Remove Covered Lifelines dialog box, check the lifeline you want to cover or uncheck the lifeline
you don’t want to cover. Click OK button.
As a result, the area of covered lifelines is extended or narrowed down according to your selection as shown in
Fig. 4.8b.
30
Managing Operands
After you've created a combined fragment on the messages, you can also add or remove operand(s). Move the
mouse over the combined fragment and select Operand > Manage Operands... from the pop-up menu as
shown in Fig. 4.8c.
Fig. 4.10
Step10: Hide editor
Collapse the quick
editor
Setting different ways of numbering sequence messages. You are able to set the way of numbering sequence
messages either on diagram base or frame base.
Single Level or Nested Level from the pop-up menu as shown in Fig. 4.10
32
Fig. 4.10 Step10 for Diagram based Sequence Message
33
Step 11:
If you choose Single Level. all sequence messages will be ordered with integers on diagram base. On the other
hand, if you choose Nested Level. all sequence messages will be ordered with decimal place on diagram base.
Right click on the diagram's background. select Sequence Number and then either Funen-based Single Level
or Frame-based Nested Level from the pop-up menu as shown in Fig. 4.11a and Fig. 4.11b.
34
Post Experiment Questions:
1. How to capture dynamic view of an application using SEQUENCE Diagram?
2. Where to draw the lifelines between actors in the diagram?
EXPERIMENT NO. 5
Description:
The class diagram is a static diagram. It represents the static view of an application. Class diagram is not only
used for visualizing, describing and documenting different aspects of a system but also for constructing execut
able code of the software application. The class diagram describes the attributes and operations of a class and
a lso the constraints imposed on the system. The class diagrams are widely used in the modelling of object-
orien ted systems because they are the only UML diagrams which can be mapped directly with object-
oriented langu ages. The class diagram shows a collection of classes, interfaces, associations, collaborations
and constraints. I t is also known as a structural diagram.
Pre-Experiment Questions:
1. What is static view of an application?
2. What is CLASS Diagram?
Procedure:
Step 1:
Right click Class Diagram on Diagram Navigator and select New Class Diagram from the pop-up menu to
create a clam diagram as shown in Fig 5.1.
35
To create class, click Class on the diagram toolbar and then click on the diagram. Class will be created as
shown in Fig 5.2.
Step 3:
To align multiplicity of an association end, right-click near the association end, select Multiplicity from
the popup menu and then select a multiplicity as shown in Fig 5.3a.
36
Step 4: The direction arrow is beside the association
Creating generalization
To create generalization from class, click the Generalization -> Class resource beside it and drag as shown in
Fig 5.4a.
Drag to empty space of the diagram to create a new class, or drag to an existing class to connect to it. Release
the mouse button to create the generalization.
Creating operation:
To copy a class member, select it and drag to the target class while keep pressing the Ctrl key, you will see a
thick black line appears indicating where the class member will be placed. A plus sign is shown beside the
mouse cursor indicating this is a copy action.
38
Release the mouse button. the class member will he copied
To move a class member, select it and drag to the target class, you will see a thick black line appears
indicating where the class member will be placed. Unlike copy, do not press the Ctrl key when drag, the
mouse
39
Model name completion for class
The model’s name completion feature enables quick creation of multiple views for the same class model.
When create or rename class, the list of classes is shown.
Press up or down key to select class in the list, press Enter to confirm. Upon selecting an existing class, all
class members and relationships are shown immediately.
40
Step 5: Continue to complete the diagram as shown in Fig 5.5.
Step 6:
Name the set in the Manage Generalization Sets dialog box, and confirm by pressing OK as shown in Fig 5.6.
41
Repeat the steps for other generalizations
42
EXPERIMENT NO -6
AIM: Draw the collaboration diagram CO3, PO1, PO2,
PO3, PO4, PO5,
PO6, PO7
Description:
A collaboration diagram, also called a communication diagram or interaction diagram, is an illustration of the
relationships and interactions among (<[Link] software
(<[Link] objects in the Unified Modeling Language (UML).
Collaboration diagrams are best suited to the portrayal of simple interactions among relatively small numbers
of objects. As the number of objects and messages grow, a collaboration diagram can become difficult. A
collaboration diagram resembles a (<[Link] flowchart that
portrays the roles, functionality and behavior of individual objects as well as the overall operation of the
system in (<[Link] real time. Objects are shown as
rectangles with naming labels inside. These labels are preceded by colons and may be underlined. The
relationships between the objects are shown as lines connecting the rectangles. The
(<[Link] messages between objects are shown as arrows
connecting the relevant rectangles along with labels that define the message sequencing.
Pre-Experiment Questions:
collaboration diagram is a kind of UML Diagram that is designed for illustrating the dynamic view of the
system. It emphasizes the structural organization of the objects' send and receive messages.
43
Step 1: Creating actor
To create an actor, click Actor on the diagram toolbar and then click on the diagram as shown in Fig. 6.1
a much quicker and more efficient way is to use Resource Catalog as shown in Fig. 6.2.
3. Release the mouse button at the place where you want the lifeline to be created.
4. Select Message -> Lifeline from Resource Catalog as shown in Fig. 6.3.
5. A new lifeline will be created and connected to the actor/lifeline with a
message. Enter its name and press Enter to confirm editing.
44
Fig. 6.4 Create message on link
When the collaboration diagram Specification window appears, the Message tab is opened by default. Double
click on the Sequence # cell of a message to edit it. Click OK button to apply the changes.
1. (<[Link]
diagram-in-staruml>) Can you generate a collaboration diagram using sequence diagram in UML?
2. (<[Link]
variables-and-attributes-va>) How to represent setting a variable's and attribute's value to a specified
value?
45
EXPERIMENT NO.-07
Description:
A state diagram, also called a (<[Link] state
machine diagram or state chart diagram, is an illustration of the states an object can attain as well as the
transitions between those states in the Unified Modeling Language (UML). In this context, a state defines a
stage in the evolution or behavior of an object, which is a specific entity in a program or the unit of code
representing that entity. State diagrams are useful in all forms of object-oriented programming (OOP).
The common model elements that state chart diagrams contain are:
States
Start and end states
Transitions
Entry, do, and exit actions
A state represents a condition during the life of an object during which it satisfies some condition or waits for
some event. Start and end states represent the beginning or ending of a process. A state transition is a
relationship between two states that indicates when an object can move the focus of control on to another state
once certain conditions are met.
Pre-Experiment Questions:
Procedure:
Step 1: Creating state machine diagram
Perform the steps below to create a UML state machine diagram in Visual Paradigm.
46
3. Click Next.
4. Enter the diagram name and description. The Location field enables you to select a model to store
the diagram.
5. Click OK.
Step 2: Creating states and transitions
After creating a state machine diagram, an initial pseudo state appears by default. You can create other states by
using Resource Catalog.
3. Release the mouse button at the place where you want the state to be created.
4. Select the state to be created from Resource Catalog.
5. A new state will be created and is transited from the source state. Enter its name and press Enter to
confirm editing.
Step 3: Adding region to state
To model substates of a composite state, you need to add one or more regions to it. To add a region, right-click
the state and select Add Horizontal Region from the popup menu as shown in Fig. 7.2.
47
Next, you can draw the substates inside the region.
In Activity Specification (Effect) window, change its name and then click OK button to apply the change.
Click OK in the Transition Specification to close it. The name and effect are shown on the transition caption.
as shown in Fig. 7.4
48
Fig 7.4 Activity diagram
1. (<[Link]
diagram-in-staruml>) What is the main usage of state chart diagram?
2. How state chart is different from collaboration Diagram?
EXPERIMENT NO.-08
AIM: Draw the component diagram. CO4, PO1,
PO2, PO3, PO4,
PO5,
PO6, PO7
Description:
Component diagrams are different in terms of nature and behavior. Component diagrams are used to model ph
ysical aspects of a system. Physical aspects are the elements like executables, libraries, files, documents etc
wh ich resides in a node. So, component diagrams are used to visualize the organization and relationships
among c omponents in a system. These diagrams are also used to make executable systems. Component
diagram is a sp ecial kind of diagram in UML. It describes the components used to make that functionality.
These components are libraries, packages, files etc.
Pre-Experiment Questions:
49
1. Where to use component Diagram?
2. What is its importance in software engineering?
Procedure:
Step 1: (<[Link]
Component diagram is a kind of (<[Link] UML
diagram. shows the physical aspect of an object-oriented software system.
When the Component Specification window is opened, with the Stereotypes tab selected. The list on the left
shows the selectable stereotypes. If the stereotype you want to use is not on the list, click Edit Stereotypes...
button. Click Add... button in the Configure Stereotypes window. Name the stereotype (e.g. application) in the
Stereotype Specification window and then click OK button to close it. Click OK button in the Configure
Stereotypes window. The added stereotype will then be shown on the list in the Component Specification
window. Select it and click Add Selected button. Finally, click OK button to confirm as shown in Fig. 8.4.
1. Select Presentation Options > Component Display Options from the popup menu.
2. Select/De-select Show Attributes to cause attributes to be shown or hidden.
Per component
You can add attributes to a component. To show/hide the attributes for a specific component:
52
3. Select/De-select Show Operations to cause attributes to be shown or hidden.
Per component
You can add operations to a component. To show/hide the operations for a specific component: Right click on
the desired component.
1. Select Presentation Options > Show Operations Mode from the popup menu.
2. Select Follow Diagram/Show All/Hide All/Customized... from the popup menu. If you have selected
the Customized option, you can select the specific operation(s) to be shown or hidden.
EXPERIMENT NO.-09
AIM: Draw the Deployment diagram. CO4, PO1, PO2,
PO3, PO4, PO5,
PO6, PO7
53
Deployment diagrams could describe architecture at specification level (also called type level) or at instance
level (similar to class diagrams and object diagrams).
(<[Link]
artifacts>) Implementation (manifestation) of components by artifacts,
(<[Link]
deployment>) Specification level deployment diagram,
(<[Link]
level deployment diagram,
(<[Link] architecture of the system.
Procedure:
54
Fig. 9.1 Node selected
When the Instance Specification window pops out, the Classifiers tab is opened by default. Click Add.. Then,
select the classifier(s) in the popup window and click OK. Click OK button to close the specification window.
The selected classifiers are assigned to the instance specification.
55
Step 6: Creating instance of component
Similar to creating instance of node, you first create a component model element and then create an instance
specification. However, this time assigns a component to the instance specification as classifier.
Drag from the source shape, move the mouse over the target shape and then release the mouse button to create
the dependency. Continue to complete the diagram.
EXPERIMENT NO.-10
AIM: Draw the Activity diagram. CO5, PO1, PO2,
PO3, PO4, PO5,
PO6, PO7
Description: Activity diagrams are mainly used as a flow chart consists of activities performed by the system.
But activity diagram are not exactly a flow chart as they have some additional capabilities. These additional
capabilities include branching, parallel flow, swim lane etc.
Pre-experimental questions:
56
Q: 2 How conditions and constraints define in activity diagram?
fig.10.2
Before or Insert Partition After from the pop-up menu as shown in fig.10.3
57
A partition is inserted as shown in fig.10.4
Click inside the partition to create the initial node there as shown in fig.10.6
58
fig.10.7
Fig.10.7 Using Resource Catalog
3. Release the mouse button at the place where you want the action to be created.
4. Select Control Flow -> Action from Resource Catalog.
5. A new action will be created and is connected to the source shape with a control flow. Enter its
name and press Enter to confirm editing.
fig.10.8
Fig.10.8 Edit scenarios
2. In the Edit Scenarios window, click Add... button at the bottom left corner.
3. Select a path for generating scenario. Click OK to confirm.
4. Name the scenario. Add description if necessary as shown in fig.10.9
59
Fig.10.9 Name and describe scenario
Step 7: The actions being involved in the flow are listed in the Path table. For actions that have sub-
diagram(s), pick up the sub-diagram in Diagram column or just create a new one.
Step 8: Click on the arrow beside the Generate button and select the type of diagram of the scenario.
60
EXPERIMENT NO.-11
AIM: Draw the Communication diagram. CO5, PO1,
PO2, PO3, PO4,
PO5,
PO6, PO7
Pre-Experimental questions:
(<[Link]
diagram/>) Communication diagram is a kind of (<[Link]
UML diagram that is designed for illustrating the dynamic view of the system. It emphasizes the structural
organization of the objects' send and receive messages.
Creating communication diagram
Perform the steps below to create a UML communication diagram in Visual Paradigm.
To create an actor, click Actor on the diagram toolbar and then click on the diagram as shown in fig.11.1
61
Creating lifeline
To create lifeline, you can click Lifeline on the diagram toolbar and then click on the diagram.
Alternatively, a much quicker and more efficient way is to use Resource Catalog:
11.2
Fig. 11.2 Resource Catalog
3. Release the mouse button at the place where you want the lifeline to be created.
4. Select Message -> lifeline from Resource Catalog as shown in
fig.11.3
Fig. 11.3 To create a lifeline
62
Fig. 11.4 Lifeline created
To create message on link, click its Create Message resource as shown in fig.11.5
To edit sequence number of messages, for example, to show certain messages are in nested level of interaction,
right-click the diagram and select Reorder Messages... from the pop-up menu as shown in fig.11.6
When the Communication Diagram Specification window appears, the Message tab is opened by default.
Double click on the Sequence # cell of a message to edit it. Click OK button to apply the changes as shown in
63
fig.11.7
64
References:
1. Unified Modeling Language User Guide, Grady Booch, James Rumbaugh, Ivar Jacobson, Publisher:
Addison Wesley, First Edition October 20, 1998, ISBN: 0-201-57168-4, 512 pages
2. Applying UML and patterns-An Introduction to Object Oriented Analysis and Design and the Unified
Process, Second Edition by Craig Larman
65