You are on page 1of 33

Shri Mata Vaishno Devi University

Katra(Jammu & Kashmir)

Software Engineering Lab Manual

Submitted to: Ms. Pooja Sharma

Submitted by : Harsh Kumar (18bcs035)

1
Index
S.no Experiment Page no.
1. Create a Use-case diagram, Class diagram, Sequence 3-10
diagram, State chart diagram, Component diagram and
Collaboration diagram for Library Management system.

2. Create a Use-case diagram, Class diagram, Sequence 11-19


diagram, State chart diagram, Component diagram and
Collaboration diagram for Hotel Management system.

3. Create a Use-case diagram, Class diagram, Sequence 20-28


diagram, State chart diagram, Component diagram and
Collaboration diagram for Hospital Management
system.

4. Create a Use-case diagram, Class diagram, Sequence 29-36


diagram, State chart diagram, Component diagram and
Collaboration diagram for Payroll system.

2
Experiment-1

1. Aim
Create a Use-case diagram, Class diagram, Sequence diagram, State chart diagram, Component
diagram and Collaboration diagram for Library Management system.

2. Hardware Requirements
❖ PC with 300 megahertz or higher processor clock speed recommended; 233 MHz minimum

required.

❖ 2 gigabytes (GB) of RAM or higher recommended (1 GB minimum supported)

❖ 10 gigabytes (GB) of available hard disk space

❖ Keyboard and Mouse(compatible pointing device).

3. Software Requirements
❖ Any window-based operating system (Windows 7 or later)

❖ Dia Diagram Software

❖ Microsoft Word

4. Theory
UML is a standard language for specifying, visualizing, constructing, and documenting the
artifacts of software systems. UML is different from the other common programming languages
such as C++, Java, COBOL, etc. UML is a pictorial language used to make software blueprints.
UML can be described as a general-purpose visual modelling language to visualize, specify,
construct, and document software system.
UML is not a programming language but tools can be used to generate code in various
languages using UML diagrams. UML has a direct relation with object-oriented analysis and
design. After some standardization, UML has become an OMG standard.

3
❖ Use Case Diagram: The purpose of use case diagram is to capture the dynamic aspect of a
system. Use case diagrams are used to gather the requirements of a system including internal
and external influences. These requirements are mostly design requirements. Hence, when a
system is analyzed to gather its functionalities, use cases are prepared and actors are
identified. When the initial task is complete, use case diagrams are modelled to present the
outside view. Use case diagrams consists of actors, use cases and their relationships.

❖ Class Diagram: 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 executable code of the software
application.
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 object-
oriented 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.

4
The purpose of the class diagram can be summarized as −

□ Analysis and design of the static view of an application.

□ Describe responsibilities of a system.

□ Base for component and deployment diagrams.

□ Forward and reverse engineering.

❖ Sequence Diagram: A sequence diagram simply depicts interaction between objects in a

sequential order i.e., the order in which these interactions take place. We can also use the
terms event diagrams or event scenarios to refer to a sequence diagram. Sequence diagrams
describe how and in what order the objects in a system function. These diagrams are widely
used by businessmen and software developers to document and understand requirements for

5
new and existing systems. Sequence Diagrams show elements as they interact over time and
they are organized according to object (horizontally) and time (vertically):
The purpose of the sequence diagram can be summarized as −

□ Model high-level interaction between active objects in a system.

□ Model the interaction between object instances within a collaboration that realizes a use

case.

□ Either model generic interactions (showing all possible paths through the interaction) or

specific instances of a interaction (showing just one path through the interaction).

❖ State Chart Diagram: 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.
Statechart diagram is one of the five UML diagrams used to model the dynamic nature of a
system. They define different states of an object during its lifetime and these states are

6
changed by events. Statechart diagrams are useful to model the reactive systems. Reactive
systems can be defined as a system that responds to external or internal events.
Statechart diagrams are also used for forward and reverse engineering of a system. However,
the main purpose is to model the reactive system.
The purpose of the sequence diagram can be summarized as −

□ To model the dynamic aspect of a system.

□ To model the life time of a reactive system.

□ To describe different states of an object during its life time.

□ Define a state machine to model the states of an object.

7
❖ Component Diagram: Component diagram is a special kind of diagram in UML. The

purpose is also different from all other diagrams discussed so far. It does not describe the
functionality of the system but it describes the components used to make those
functionalities.
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. Component diagrams are used to visualize the organization
and relationships among components in system. This diagram are used to make executable
system.

The purpose of the component diagram can be summarized as −

□ Visualize the components of a system.

□ Construct executables by using forward and reverse engineering.

□ Describe the organization and relationships of the components.

8
❖ Collaboration Diagram: The collaboration diagram is used to show the relationship

between the objects in a system. Both the sequence and the collaboration diagrams represent
the same information but differently. Instead of showing the flow of messages, it depicts the
architecture of the object residing in the system as it is based on object-oriented
programming. An object consists of several features. Multiple objects present in the system
are connected to each other. The collaboration diagram, which is also known as a
communication diagram, is used to portray the object's architecture in the system.
The benefits of collaboration can be summarized as:

□ The collaboration diagram is also known as Communication Diagram.


□ It mainly puts emphasis on the structural aspect of an interaction diagram, i.e., how
lifelines are connected.
□ The syntax of a collaboration diagram is similar to the sequence diagram; just the
difference is that the lifeline does not consist of tails.
□ The messages transmitted over sequencing is represented by numbering each individual
message.
□ The collaboration diagram is semantically weak in comparison to the sequence diagram.

5. Conclusion

9
The Library Management System was made successfully in the Dia Software & explained
thoroughly in the above diagrams.

Experiment-2

1. Aim
Create a Use-case diagram, Class diagram, Sequence diagram, State chart diagram, Component
diagram and Collaboration diagram for Hotel Management system.

2. Hardware Requirements
❖ PC with 300 megahertz or higher processor clock speed recommended; 233 MHz minimum

required.

❖ 2 gigabytes (GB) of RAM or higher recommended (1 GB minimum supported)

❖ 10 gigabytes (GB) of available hard disk space

❖ Keyboard and Mouse(compatible pointing device).

10
3. Software Requirements
❖ Any window-based operating system (Windows 7 or later)

❖ Dia Diagram Software

❖ Microsoft Word

4. Theory
UML is a standard language for specifying, visualizing, constructing, and documenting the
artifacts of software systems. UML is different from the other common programming languages
such as C++, Java, COBOL, etc. UML is a pictorial language used to make software blueprints.
UML can be described as a general-purpose visual modelling language to visualize, specify,
construct, and document software system.
UML is not a programming language but tools can be used to generate code in various
languages using UML diagrams. UML has a direct relation with object-oriented analysis and
design. After some standardization, UML has become an OMG standard.
❖ Use Case Diagram: The purpose of use case diagram is to capture the dynamic aspect of a
system. Use case diagrams are used to gather the requirements of a system including internal
and external influences. These requirements are mostly design requirements. Hence, when a
system is analyzed to gather its functionalities, use cases are prepared and actors are
identified. When the initial task is complete, use case diagrams are modelled to present the
outside view. Use case diagrams consists of actors, use cases and their relationships.

11
❖ Class Diagram: 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 executable code of the software
application.
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 object-
oriented 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.
The purpose of the class diagram can be summarized as −

□ Analysis and design of the static view of an application.

□ Describe responsibilities of a system.

□ Base for component and deployment diagrams.

□ Forward and reverse engineering.

12
❖ Sequence Diagram: A sequence diagram simply depicts interaction between objects in a

sequential order i.e., the order in which these interactions take place. We can also use the
terms event diagrams or event scenarios to refer to a sequence diagram. Sequence diagrams
describe how and in what order the objects in a system function. These diagrams are widely
used by businessmen and software developers to document and understand requirements for
new and existing systems. Sequence Diagrams show elements as they interact over time and
they are organized according to object (horizontally) and time (vertically):
Sequence Diagrams are time focus and they show the order of the interaction visually by
using the vertical axis of the diagram to represent time what messages are sent and when.
The purpose of the sequence diagram can be summarized as −

□ Model high-level interaction between active objects in a system.

□ Model the interaction between object instances within a collaboration that realizes a use

case.

□ Either model generic interactions (showing all possible paths through the interaction) or

specific instances of an interaction (showing just one path through the interaction).

13
14
❖ State Chart Diagram: 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.
Statechart diagram is one of the five UML diagrams used to model the dynamic nature of a
system. They define different states of an object during its lifetime and these states are
changed by events. Statechart diagrams are useful to model the reactive systems. Reactive
systems can be defined as a system that responds to external or internal events.
Statechart diagrams are also used for forward and reverse engineering of a system. However,
the main purpose is to model the reactive system.
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 purpose of the sequence diagram can be summarized as −

□ To model the dynamic aspect of a system.

□ To model the life time of a reactive system.

□ To describe different states of an object during its life time.

□ Define a state machine to model the states of an object.

15
❖ Component Diagram: Component diagram is a special kind of diagram in UML. The

purpose is also different from all other diagrams discussed so far. It does not describe the
functionality of the system but it describes the components used to make those
functionalities.
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. Component diagrams are used to visualize the organization
and relationships among components in system. This diagram are used to make executable
system.

The purpose of the component diagram can be summarized as −

□ Visualize the components of a system.

□ Construct executables by using forward and reverse engineering.

16
□ Describe the organization and relationships of the components

❖ Collaboration Diagram: The collaboration diagram is used to show the relationship

between the objects in a system. Both the sequence and the collaboration diagrams represent
the same information but differently. Instead of showing the flow of messages, it depicts the
architecture of the object residing in the system as it is based on object-oriented
programming. An object consists of several features. Multiple objects present in the system
are connected to each other. The collaboration diagram, which is also known as a
communication diagram, is used to portray the object's architecture in the system.
The benefits of collaboration can be summarized as:

□ The collaboration diagram is also known as Communication Diagram.


□ It mainly puts emphasis on the structural aspect of an interaction diagram, i.e., how
lifelines are connected.
□ The syntax of a collaboration diagram is similar to the sequence diagram; just the
difference is that the lifeline does not consist of tails.
□ The messages transmitted over sequencing is represented by numbering each individual
message.
□ The collaboration diagram is semantically weak in comparison to the sequence diagram.

17
5. Conclusion
The Hotel Management System was made successfully in the Dia Software & explained
thoroughly in the above diagrams.

18
Experiment-3

1. Aim
Create a Use-case diagram, Class diagram, Sequence diagram, State chart diagram, Component
diagram and Collaboration diagram for Hospital Management system.

2. Hardware Requirements
❖ PC with 300 megahertz or higher processor clock speed recommended; 233 MHz minimum

required.

❖ 2 gigabytes (GB) of RAM or higher recommended (1 GB minimum supported)

❖ 10 gigabytes (GB) of available hard disk space

❖ Keyboard and Mouse(compatible pointing device).

3. Software Requirements
❖ Any window-based operating system (Windows 7 or later)

❖ Dia Diagram Software

❖ Microsoft Word

4. Theory
UML is a standard language for specifying, visualizing, constructing, and documenting the
artifacts of software systems. UML is different from the other common programming languages
such as C++, Java, COBOL, etc. UML is a pictorial language used to make software blueprints.
UML can be described as a general-purpose visual modelling language to visualize, specify,
construct, and document software system.
UML is not a programming language but tools can be used to generate code in various
languages using UML diagrams. UML has a direct relation with object-oriented analysis and
design. After some standardization, UML has become an OMG standard.
❖ Use Case Diagram: The purpose of use case diagram is to capture the dynamic aspect of a
system. Use case diagrams are used to gather the requirements of a system including internal
and external influences. These requirements are mostly design requirements. Hence, when a

19
system is analyzed to gather its functionalities, use cases are prepared and actors are
identified. When the initial task is complete, use case diagrams are modelled to present the
outside view. Use case diagrams consists of actors, use cases and their relationships.

❖ Class Diagram: 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 executable code of the software
application.
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 object-
oriented systems because they are the only UML diagrams, which can be mapped directly
with object-oriented languages.

20
Class diagram shows a collection of classes, interfaces, associations, collaborations, and
constraints. It is also known as a structural diagram.
The purpose of the class diagram can be summarized as −

□ Analysis and design of the static view of an application.

□ Describe responsibilities of a system.

□ Base for component and deployment diagrams.

□ Forward and reverse engineering.

❖ Sequence Diagram: A sequence diagram simply depicts interaction between objects in a

sequential order i.e., the order in which these interactions take place. We can also use the
terms event diagrams or event scenarios to refer to a sequence diagram. Sequence diagrams
describe how and in what order the objects in a system function. These diagrams are widely
used by businessmen and software developers to document and understand requirements for

21
new and existing systems. Sequence Diagrams show elements as they interact over time and
they are organized according to object (horizontally) and time (vertically).
The purpose of the sequence diagram can be summarized as −

□ Model high-level interaction between active objects in a system.

□ Model the interaction between object instances within a collaboration that realizes a use

case.

□ Either model generic interactions (showing all possible paths through the interaction) or

specific instances of an interaction (showing just one path through the interaction).

□ Plan and understand the detailed functionality of an existing or future scenario.

❖ State Chart Diagram: 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.
Statechart diagram is one of the five UML diagrams used to model the dynamic nature of a
system. They define different states of an object during its lifetime and these states are
changed by events. Statechart diagrams are useful to model the reactive systems. Reactive
systems can be defined as a system that responds to external or internal events.

22
Statechart diagrams are also used for forward and reverse engineering of a system. However,
the main purpose is to model the reactive system.
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 purpose of the sequence diagram can be summarized as −

□ To model the dynamic aspect of a system.

□ To model the life time of a reactive system.

□ To describe different states of an object during its life time.

□ Define a state machine to model the states of an object.

23
❖ Component Diagram: Component diagram is a special kind of diagram in UML. The

purpose is also different from all other diagrams discussed so far. It does not describe the
functionality of the system but it describes the components used to make those
functionalities.
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. Component diagrams are used to visualize the organization
and relationships among components in system. This diagram is used to make executable
system.

The purpose of the component diagram can be summarized as −

□ Visualize the components of a system.

□ Construct executables by using forward and reverse engineering.

□ Describe the organization and relationships of the components.

Component diagrams are very important from implementation perspective. Thus, the
implementation team of an application should have a proper knowledge of the component
details.

Component diagrams can be used to −


□ Model the components of a system.

24
□ Model the database schema.

□ Model the executables of an application.

❖ Collaboration Diagram: The collaboration diagram is used to show the relationship

between the objects in a system. Both the sequence and the collaboration diagrams represent
the same information but differently. Instead of showing the flow of messages, it depicts the
architecture of the object residing in the system as it is based on object-oriented
programming. An object consists of several features. Multiple objects present in the system
are connected to each other. The collaboration diagram, which is also known as a
communication diagram, is used to portray the object's architecture in the system.
The benefits of collaboration can be summarized as:

□ The collaboration diagram is also known as Communication Diagram.


□ It mainly puts emphasis on the structural aspect of an interaction diagram, i.e., how
lifelines are connected.
□ The syntax of a collaboration diagram is similar to the sequence diagram; just the
difference is that the lifeline does not consist of tails.

25
□ The messages transmitted over sequencing is represented by numbering each individual
message.
□ The collaboration diagram is semantically weak in comparison to the sequence diagram.

5. Conclusion
The Hospital Management System was made successfully in the Dia Software & explained
thoroughly in the above diagrams.

Experiment-4

1. Aim
Create a Use-case diagram, Class diagram, Sequence diagram, State chart diagram, Component
diagram and Collaboration diagram for Payroll system.

2. Hardware Requirements

26
❖ PC with 300 megahertz or higher processor clock speed recommended; 233 MHz minimum

required.

❖ 2 gigabytes (GB) of RAM or higher recommended (1 GB minimum supported)

❖ 10 gigabytes (GB) of available hard disk space

❖ Keyboard and Mouse(compatible pointing device).

3. Software Requirements
❖ Any window-based operating system (Windows 7 or later)

❖ Dia Diagram Software

❖ Microsoft Word

4. Theory
UML is a standard language for specifying, visualizing, constructing, and documenting the
artifacts of software systems. UML is different from the other common programming languages
such as C++, Java, COBOL, etc. UML is a pictorial language used to make software blueprints.
UML can be described as a general-purpose visual modelling language to visualize, specify,
construct, and document software system.
UML is not a programming language but tools can be used to generate code in various
languages using UML diagrams. UML has a direct relation with object-oriented analysis and
design. After some standardization, UML has become an OMG standard.
❖ Use Case Diagram: The purpose of use case diagram is to capture the dynamic aspect of a
system. Use case diagrams are used to gather the requirements of a system including internal
and external influences. These requirements are mostly design requirements. Hence, when a
system is analyzed to gather its functionalities, use cases are prepared and actors are
identified. When the initial task is complete, use case diagrams are modelled to present the
outside view. Use case diagrams consists of actors, use cases and their relationships.

27
❖ Class Diagram: 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 executable code of the software
application.
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 object-
oriented 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.
The purpose of the class diagram can be summarized as −

□ Analysis and design of the static view of an application.

□ Describe responsibilities of a system.

□ Base for component and deployment diagrams.

□ Forward and reverse engineering.

28
❖ Sequence Diagram: A sequence diagram simply depicts interaction between objects in a

sequential order i.e., the order in which these interactions take place. We can also use the
terms event diagrams or event scenarios to refer to a sequence diagram. Sequence diagrams
describe how and in what order the objects in a system function. These diagrams are widely
used by businessmen and software developers to document and understand requirements for
new and existing systems. Sequence Diagrams show elements as they interact over time and
they are organized according to object (horizontally) and time (vertically).
The purpose of the sequence diagram can be summarized as −

□ Model high-level interaction between active objects in a system.

□ Model the interaction between object instances within a collaboration that realizes a use

case.

□ Plan and understand the detailed functionality of an existing or future scenario.

□ Either model generic interactions (showing all possible paths through the interaction) or

specific instances of an interaction (showing just one path through the interaction).

29
❖ State Chart Diagram: 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.
Statechart diagram is one of the five UML diagrams used to model the dynamic nature of a
system. They define different states of an object during its lifetime and these states are
changed by events. Statechart diagrams are useful to model the reactive systems. Reactive
systems can be defined as a system that responds to external or internal events.
Statechart diagrams are also used for forward and reverse engineering of a system. However,
the main purpose is to model the reactive system.
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 purpose of the sequence diagram can be summarized as −

□ To model the dynamic aspect of a system.

□ To model the life time of a reactive system.

□ To describe different states of an object during its life time.

□ Define a state machine to model the states of an object.

□ Identify the important objects to be analyzed.

30
❖ Component Diagram: Component diagram is a special kind of diagram in UML. The

purpose is also different from all other diagrams discussed so far. It does not describe the
functionality of the system but it describes the components used to make those
functionalities.
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. This diagram is used to make executable system.

The purpose of the component diagram can be summarized as −

□ Visualize the components of a system.

□ Construct executables by using forward and reverse engineering.

31
□ Describe the organization and relationships of the components.

Component diagrams are very important from implementation perspective. Thus, the
implementation team of an application should have a proper knowledge of the component
details.

Component diagrams can be used to −


□ Model the components of a system.

□ Model the database schema.

□ Model the executables of an application.

❖ Collaboration Diagram: The collaboration diagram is used to show the relationship

between the objects in a system. Both the sequence and the collaboration diagrams represent
the same information but differently. Instead of showing the flow of messages, it depicts the

32
architecture of the object residing in the system as it is based on object-oriented
programming. An object consists of several features. Multiple objects present in the system
are connected to each other. The collaboration diagram, which is also known as a
communication diagram, is used to portray the object's architecture in the system.
The benefits of collaboration can be summarized as:

□ The collaboration diagram is also known as Communication Diagram.


□ It mainly puts emphasis on the structural aspect of an interaction diagram, i.e., how
lifelines are connected.
□ The syntax of a collaboration diagram is similar to the sequence diagram; just the
difference is that the lifeline does not consist of tails.
□ The messages transmitted over sequencing is represented by numbering each individual
message.
□ The collaboration diagram is semantically weak in comparison to the sequence diagram.

5. Conclusion
The Payroll System was made successfully in the Dia Software & explained thoroughly in the
above diagrams.

33

You might also like