New Lab File 02-01-2025
New Lab File 02-01-2025
B.Tech CSE
LIST OF EXPERIMENT
Reference
Sr. No. Date Name of Experiment
Material
R1,W1, W2
Prepare a SRS document in line with the IEEE recommended
1 2025-02-16
standards..
R1,W1, W2
Draw the use case diagram and specify the role of each of the
2 2025-02-23
actors.
R1,W1, W2
Identify the classes. Classify them as weak and strong classes and
3 2025-03-01
draw the class diagram.
R1,W1, W2
4 2025-03-15 Draw the activity diagram.
R1,W1, W2
5 2025-03-22 Draw the sequence diagram for any two scenarios.
R1,W1, W2
6 25-03-29 Draw the collaboration diagram..
R1,W1, W2
7 2025-04-05 Draw the state chart diagram.
R1,W1, W2
8 2025-04-12 Draw the component diagram
R1,W1, W2
9 2025-04-19 Perform forward engineering in java
R1,W1, W2
10 2025-04-26 Perform reverse engineering in java
R1: Software Engineering: A Practitioner’s Approach, 8/e Paperback by Roger S. Pressman, Bruce R.
Maxim
W1: https://www.visual-paradigm.com/guide/uml-unified-modeling-language/
W2: http://vlabs.iitkgp.ac.in/se/
LIST OF EXPERIMENTS
2 Use case Diagram Draw the use case diagram and specify the role of each of the actors.
Identify the classes. Classify them as weak and strong classes and
3 Class Diagram
draw the class diagram.
5 Sequence diagram Draw the sequence diagram for any two scenarios.
Submitted to Submitted By
(Teacher’s Name) (Student Name)
List of Programme
Sr.
Type Name of experiment
N.
Prepare a SRS document in line with the IEEE
1 SRS document
recommended standards.
Draw the use case diagram and specify the role of each of
2 Use case Diagram
the actors.
Identify the classes. Classify them as weak and strong
3 Class Diagram
classes and draw the class diagram.
5 Sequence diagram Draw the sequence diagram for any two scenarios.
Contents
W1: https://www.visual-paradigm.com/guide/uml-unified-modeling-language/ .................... 3
W2: http://vlabs.iitkgp.ac.in/se/ ............................................................................................. 3
Purpose of Class Diagrams .............................................................................................. 12
How to Draw a Class Diagram? ....................................................................................... 12
Where to Use Class Diagrams?........................................................................................ 13
Purpose of Activity Diagrams .......................................................................................... 15
How to Draw an Activity Diagram? ................................................................................ 15
Where to Use Activity Diagrams? ................................................................................... 16
Contents of Collaboration Diagrams ............................................................................ 22
Purpose of Statechart Diagrams ....................................................................................... 24
How to Draw a Statechart Diagram?................................................................................ 24
Where to Use Statechart Diagrams?................................................................................. 25
Purpose of Component Diagrams .................................................................................... 27
How to Draw a Component Diagram? ............................................................................. 27
Where to Use Component Diagrams? .............................................................................. 28
Purpose of Deployment Diagrams ................................................................................... 33
How to Draw a Deployment Diagram? ............................................................................ 33
Where to Use Deployment Diagrams? ............................................................................. 34
Experiment No: 2
Type of problem Use case Diagram
List of program All Draw the use case diagram and specify the role of each of the
actors.
Use Case Specification :<Use-Case Name>
1. Use Case Name
[ The description should briefly convey the role and purpose of the use case. A single paragraph should suffice for
this description.]
2. Flow of Events
[ This use case starts when the actor does something. An actor always initiates use Cases. The use case should
describe what the actor does and what the system does in response. It should be phrased in the form of a dialog
between the actor and the system.
The use case should describe what happens inside the system, but not how or why. If information is exchanged be
specific about what is passed back and forth. For example, it is not very illuminating to say that the Actor enters
customer information; it is better to say the Actor enters the customer’s name and address. A Glossary of Terms is
often useful to keep the complexity of the use case manageable; you may want to define things like customer
information there, to keep the use case from drowning in details.
Simple alternatives may be presented within the text of the use case. If it only takes a few sentences to
describe what happens when there is an alternative; do it directly within the flow of events section. If the
alternative flows are more complex, use a separate section to describe it. For example An Alternative Flow
describes how to describe more complex alternatives.
A picture is sometimes worth a thousand words (though there is no substitute for clean, clear prose). If it improves
clarity, feel free to paste graphical depictions of user interfaces, process flows, or other figures into the use case to
improve its clarity. If a flow chart is useful to present a complex decision process, by all means use it! Similarly
for state-dependent behavior, a state-transition diagram often clarifies the behavior of a system better than pages
upon pages of text. Use the right presentation medium for your problem, but be wary of using terminology,
notation or figures that your audience may not understand. Remember that your purpose is to clarify, not obscure.]
[More complex alternatives should be described in a separate section, which is referred to in the basic flow of
events section. Think of the alternative flow sections like alternative behavior each alternative flow represents
alternative behavior (many times, because of exceptions that occur in the main flow). They may be as long as
necessary to describe the events associated with the alternative behavior. When an alternative flow ends, the
events of the main flow of events are resumed unless otherwise stated.]
2.2.1.1 <An Alternative sub-flow>
[Alternative flows may in turn be broken down into sub-sections if it improves clarity.]
2.2.2 <Second Alternative Flow>
[There may be, and most likely will be, a number of alternative flows in a use case. Keep each alternative separate
to improve clarity. Using alternative flows improves the readability of the use case, as well as preventing use cases
from being decomposed into hierarchies of use cases. Keep in mind that use cases are just textual descriptions, and
their main purpose is to document the behavior of a system in a clear, concise and understandable way.]
3. Special Requirements
[A Special Requirement is typically a non-functional requirement that is specific to a use case but is not easily or
naturally specified in the text of the use case’s event flow. Examples of special requirements include legal and
regulatory requirements, application standards, and quality attributes of the system to be built, including usability,
reliability, performance or supportability requirements. Additionally, other requirements such as operating systems
and environments, compatibility requirements, and design constraints should be captured in this section.]
4. Preconditions
[A precondition (of a use case) is the state of the system that must be present prior to a use case being performed.]
5. Post Conditions
[A post condition (of a use case) is a list of possible states the system can be in immediately after a use case has
finished.]
5.1 <Post condition one>
6. Extension Points
Class diagram describes the attributes and operations of a class and also the constraints imposed on the
system. The class diagrams are widely used in the modeling of objectoriented systems because they are
the only UML diagrams, which can be mapped directly with object-oriented languages.
Class diagram shows a collection of classes, interfaces, associations, collaborations, and constraints. It is
also known as a structural diagram.
UML diagrams like activity diagram, sequence diagram can only give the sequence flow of the
application, however class diagram is a bit different. It is the most popular UML diagram in the coder
community.
Class diagrams have a lot of properties to consider while drawing but here the diagram will be
considered from a top level view.
Class diagram is basically a graphical representation of the static view of the system and represents
different aspects of the application. A collection of class diagrams represent the whole system.
● The name of the class diagram should be meaningful to describe the aspect of the system.
● Use notes whenever required to describe some aspect of the diagram. At the end of the drawing it
should be understandable to the developer/coder.
● Finally, before making the final version, the diagram should be drawn on plain paper and
reworked as many times as possible to make it correct.
● First of all, Order and Customer are identified as the two elements of the system. They have a
one-to-many relationship because a customer can have multiple orders.
● Order class is an abstract class and it has two concrete classes (inheritance relationship)
SpecialOrder and NormalOrder.
● The two inherited classes have all the properties as the Order class. In addition, they have
additional functions like dispatch () and receive ().
The following class diagram has been drawn considering all the points mentioned above.
Class diagram is also considered as the foundation for component and deployment diagrams. Class
diagrams are not only used to visualize the static view of the system but they are also used to construct
the executable code for forward and reverse engineering of any system.
Generally, UML diagrams are not directly mapped with any object-oriented programming languages but
the class diagram is an exception.
Class diagram clearly shows the mapping with object-oriented languages such as Java, C++, etc. From
practical experience, class diagram is generally used for construction purpose.
Activity diagram is basically a flowchart to represent the flow from one activity to another activity. The
activity can be described as an operation of the system.
The control flow is drawn from one operation to another. This flow can be sequential, branched, or
concurrent. Activity diagrams deal with all type of flow control by using different elements such as fork,
join, etc
Activity is a particular operation of the system. Activity diagrams are not only used for visualizing the
dynamic nature of a system, but they are also used to construct the executable system by using forward
and reverse engineering techniques. The only missing thing in the activity diagram is the message part.
It does not show any message flow from one activity to another. Activity diagram is sometimes
considered as the flowchart. Although the diagrams look like a flowchart, they are not. It shows different
flows such as parallel, branched, concurrent, and single.
Before drawing an activity diagram, we must have a clear understanding about the elements used in
activity diagram. The main element of an activity diagram is the activity itself. An activity is a function
performed by the system. After identifying the activities, we need to understand how they are associated
with constraints and conditions.
● Activities
● Association
● Conditions
● Constraints
Once the above-mentioned parameters are identified, we need to make a mental layout of the entire flow.
This mental layout is then transformed into an activity diagram.
Following is an example of an activity diagram for order management system. In the diagram, four
activities are identified which are associated with conditions. One important point should be clearly
understood that an activity diagram cannot be exactly matched with the code. The activity diagram is
made to understand the flow of activities and is mainly used by the business users
After receiving the order request, condition checks are performed to check if it is normal or special order.
After the type of order is identified, dispatch activity is performed and that is marked as the termination
of the process.
Activity diagram is suitable for modeling the activity flow of the system. An application can have
multiple systems. Activity diagram also captures these systems and describes the flow from one system
to another. This specific usage is not available in other diagrams. These systems can be database,
external queues, or any other system.
We will now look into the practical applications of the activity diagram. From the above discussion, it is
clear that an activity diagram is drawn from a very high level. So it gives high level view of a system.
This high level view is mainly for business users or any other person who is not a technical person.
This diagram is used to model the activities which are nothing but business requirements. The diagram
has more impact on business understanding rather than on implementation details.
A brief description on the symbols used in the sequence diagram explaining the reason for the usage of
that particular symbol.
Messages
Messages are arrows that represent communication between objects. Use half-arrowed lines to represent
asynchronous messages. Asynchronous messages are sent from an object that will not wait for a response
from the receiver before continuing its tasks. For message types, see below.
Lifelines
Lifelines are vertical dashed lines that indicate the object's presence over time.
Destroying Objects
Objects can be terminated early using an arrow labeled "<< destroy >>" that points to an X. This object is
removed from memory. When that object's lifeline ends, you can place an X at the end of its lifeline to
denote a destruction occurrence.
Loops
A repetition or loop within a sequence diagram is depicted as a rectangle. Place the condition for exiting
the loop at the bottom left corner in square brackets [ ].
Types of Messages in Sequence Diagrams
Synchronous Message
A synchronous message requires a response before the interaction can continue. It's usually drawn using a
line with a solid arrowhead pointing from one object to another.
Asynchronous Message
Asynchronous messages don't need a reply for interaction to continue. Like synchronous messages, they
are drawn with an arrow connecting two lifelines; however, the arrowhead is usually open and there's no
return message depicted.
Self Message
A message an object sends to itself, usually shown as a U shaped arrow pointing back to itself.
Create Message
This is a message that creates a new object. Similar to a return message, it's depicted with a dashed line
and an open arrowhead that points to the rectangle representing the object created.
Delete Message
This is a message that destroys an object. It can be shown by an arrow with an x at the end.
Found Message
A message sent from an unknown recipient, shown by an arrow from an endpoint to a lifeline.
Lost Message
A message sent to an unknown recipient. It's shown by an arrow going from a lifeline to an endpoint, a
filled circle or an x.
Collaboration diagrams are used to show how objects interact to perform the behavior of a particular use
case, or a part of a use case. Along with sequence diagrams, collaborations are used by designers to define
and clarify the roles of the objects that perform a particular flow of events of a use case. They are the
primary source of information used to determining class responsibilities and interfaces.
Unlike a sequence diagram, a collaboration diagram shows the relationships among the objects. Sequence
diagrams and collaboration diagrams express similar information, but show it in different ways.
Collaboration diagrams show the relationships among objects and are better for understanding all the
effects on a given object and for procedural design.
Because of the format of the collaboration diagram, they tend to better suited for analysis activities.
Specifically, they tend to be better suited to depicting simpler interactions of smaller numbers of objects.
As the number of objects and messages grows, the diagram becomes increasingly hard to read. In
addition, it is difficult to show additional descriptive information such as timing, decision points, or other
unstructured information that can be easily added to the notes in a sequence diagram.
You can have objects and actor instances in collaboration diagrams, together with links and messages
describing how they are related and how they interact. The diagram describes what takes place in the
participating objects, in terms of how the objects communicate by sending messages to one another. You
can make a collaboration diagram for each variant of a use case's flow of events.
A collaboration diagram that describes part of the flow of events of the use
case Receive Deposit Item in the Recycling-Machine System.
Objects
An object is represented by an object symbol showing the name of the object and its class underlined,
separated by a colon:
objectname :classname
● An object's class can be unspecified. Normally you create a collaboration diagram with objects first
and specify their classes later.
● The objects can be unnamed, but you should name them if you want to discriminate different objects
of the same class.
● An object's class can itself be represented in a collaboration diagram, if it actively participates in the
collaboration.
Actors
Normally an actor instance occurs in the collaboration diagram, as the invoker of the interaction. If you
have several actor instances in the same diagram, try keeping them in the periphery of the diagram.
Links
● A link is a relationship among objects across which messages can be sent. In collaboration diagrams,
a link is shown as a solid line between two objects.
● An object interacts with, or navigates to, other objects through its links to these objects.
● A link can be an instance of an association, or it can be anonymous, meaning that its association is
unspecified.
● Message flows are attached to links, see Messages.
Messages
A message is a communication between objects that conveys information with the expectation that
activity will ensue. In collaboration diagrams, a message is shown as a labeled arrow placed near a link.
This means that the link is used to transport, or otherwise implement the delivery of the message to the
target object. The arrow points along the link in the direction of the target object (the one that receives the
message). The arrow is labeled with the name of the message, and its parameters. The arrow may also be
labeled with a sequence number to show the sequence of the message in the overall interaction. Sequence
numbers are often used in collaboration diagrams, because they are the only way of describing the relative
sequencing of messages.
A message can be unassigned, meaning that its name is a temporary string that describes the overall
meaning of the message. You can later assign the message by specifying the operation of the message's
destination object. The specified operation will then replace the name of the message.
Experiment No: 7
Type of problem State chart diagram
List of program All Draw the state chart diagram.
The name of the diagram itself clarifies the purpose of the diagram and other details. It describes
different states of a component in a system. The states are specific to a component/object of a system.
A Statechart diagram describes a state machine. State machine can be defined as a machine which
defines different states of an object and these states are controlled by external or internal events.
Activity diagram explained in the next chapter, is a special kind of a Statechart diagram. As Statechart
diagram defines the states, it is used to model the lifetime of an object.
Statechart diagram describes the flow of control from one state to another state. States are defined as a
condition in which an object exists and it changes when some event is triggered. The most important
purpose of Statechart diagram is to model lifetime of an object from creation to termination.
Statechart diagrams are also used for forward and reverse engineering of a system. However, the main
purpose is to model the reactive system.
Statechart diagrams are very important for describing the states. States can be identified as the condition
of objects when a particular event occurs.
Following is an example of a Statechart diagram where the state of Order object is analyzed
The first state is an idle state from where the process starts. The next states are arrived for events like
send request, confirm request, and dispatch order. These events are responsible for the state changes of
order object.
During the life cycle of an object (here order object) it goes through the following states and there may
be some abnormal exits. This abnormal exit may occur due to some problem in the system. When the
entire life cycle is complete, it is considered as a complete transaction as shown in the following figure.
The initial and final state of an object is also shown in the following figure.
Statechart diagram defines the states of a component and these state changes are dynamic in nature. Its
specific purpose is to define the state changes triggered by events. Events are internal or external factors
influencing the system.
Statechart diagrams are used to model the states and also the events operating on the system. When
implementing a system, it is very important to clarify different states of an object during its life time and
Statechart diagrams are used for this purpose. When these states and events are identified, they are used
to model it and these models are used during the implementation of the system.
If we look into the practical implementation of Statechart diagram, then it is mainly used to analyze the
object states influenced by events. This analysis is helpful to understand the system behavior during its
execution.
Component diagrams are used to visualize the organization and relationships among components in a
system. These diagrams are also used to make executable systems.
Thus from that point of view, component diagrams are used to visualize the physical components in a
system. These components are libraries, packages, files, etc.
Component diagrams can also be described as a static implementation view of a system. Static
implementation represents the organization of the components at a particular moment.
A single component diagram cannot represent the entire system but a collection of diagrams is used to
represent the whole.
The purpose of this diagram is different. Component diagrams are used during the implementation phase
of an application. However, it is prepared well in advance to visualize the implementation details.
Initially, the system is designed using different UML diagrams and then when the artifacts are ready,
component diagrams are used to get an idea of the implementation.
This diagram is very important as without it the application cannot be implemented efficiently. A well-
prepared component diagram is also important for other aspects such as application performance,
maintenance, etc.
Before drawing a component diagram, the following artifacts are to be identified clearly −
After identifying the artifacts, the following points need to be kept in mind.
● Use a meaningful name to identify the component for which the diagram is to be drawn.
Following is a component diagram for order management system. Here, the artifacts are files. The
diagram shows the files in the application and their relationships. In actual, the component diagram also
contains dlls, libraries, folders, etc.
In the following diagram, four files are identified and their relationships are produced. Component
diagram cannot be matched directly with other UML diagrams discussed so far as it is drawn for
completely different purpose.
The following component diagram has been drawn considering all the points mentioned above.
These diagrams show the physical components of a system. To clarify it, we can say that component
diagrams describe the organization of the components in a system.
Organization can be further described as the location of the components in a system. These components
are organized in a special way to meet the system requirements.
As we have already discussed, those components are libraries, files, executables, etc. Before
implementing the application, these components are to be organized. This component organization is also
designed separately as a part of project execution.
Component diagrams are very important from implementation perspective. Thus, the implementation
team of an application should have a proper knowledge of the component details
All of these classes specify a mapping to Java, as noted in their stereotype. Forward engineering the
classes in this diagram to Java is straightforward, using a tool. Forward engineering the
class EventHandler yields the following code.
public abstract class EventHandler {
EventHandler successor;
private Integer currentEventID;
private String source;
EventHandler() {}
public void handleRequest() {}
}
Experiment No: 10
Type of problem Reverse engineering.
List of program All Perform reverse engineering in java
Reverse engineering is the process of transforming code into a model through a mapping from a specific
implementation language. Reverse engineering results in a flood of information, some of which is at a
lower level of detail than you'll need to build useful models. At the same time, reverse engineering is
incomplete. There is a loss of information when forward engineering models into code, and so you can't
completely recreate a model from code unless your tools encode information in the source comments that
goes beyond the semantics of the implementation language.
To reverse engineer a class diagram,
● Identify the rules for mapping from your implementation language or languages of choice. This is
something you'll want to do for your project or your organization as a whole.
● Using a tool, point to the code you'd like to reverse engineer. Use your tool to generate a new
model or modify an existing one that was previously forward engineered. It is unreasonable to
expect to reverse engineer a single concise model from a large body of code. You need to select
portion of the code and build the model from the bottom.
● Using your tool, create a class diagram by querying the model. For example, you might start with
one or more classes, then expand the diagram by following specific relationships or other
neighboring classes. Expose or hide details of the contents of this class diagram as necessary to
communicate your intent.
● Manually add design information to the model to express the intent of the design that is missing or
hidden in the code.
Experiment No: 10
Type of problem Deployment diagram
List of program All Draw the deployment diagram.
Deployment diagrams are used to visualize the topology of the physical components of a system, where
the software components are deployed.
Deployment diagrams are used to describe the static deployment view of a system. Deployment diagrams
consist of nodes and their relationships.
Component diagrams are used to describe the components and deployment diagrams shows how they are
deployed in hardware.
UML is mainly designed to focus on the software artifacts of a system. However, these two diagrams are
special diagrams used to focus on software and hardware components.
Most of the UML diagrams are used to handle logical components but deployment diagrams are made to
focus on the hardware topology of a system. Deployment diagrams are used by the system engineers.
Deployment diagrams are useful for system engineers. An efficient deployment diagram is
very important as it controls the following parameters −
● Performance
● Scalability
● Maintainability
● Portability
● Nodes
● Relationships among nodes
● Monitor
● Modem
● Caching server
● Server
The following deployment diagram has been drawn considering all the points mentioned above.
Deployment diagrams can be visualized as the hardware components/nodes on which the software
components reside.
Software applications are developed to model complex business processes. Efficient software
applications are not sufficient to meet the business requirements. Business requirements can be described
as the need to support the increasing number of users, quick response time, etc.
To meet these types of requirements, hardware components should be designed efficiently and in a cost-
effective way.
Now-a-days software applications are very complex in nature. Software applications can be standalone,
web-based, distributed, mainframe-based and many more. Hence, it is very important to design the
hardware components efficiently.
ASSESSMENT PROCESS
ASSESSMENT TOOLS
⮚ Direct assessment tools:
✔ Quizzes
✔ Project Based Learning (PBL)
✔ External University Examinations.
⮚ Indirect assessment tool:
✔ Course exit survey.
Assessment Tools
Course
Outcomes
Direct Indirect