Software Enginnering - Lab Manual
Software Enginnering - Lab Manual
Laboratory Manual
Year: 2024-25
Prepared By:
Prof. Madhuri Parekh,Prof. Ravi Patel
INDEX
Page No.
Sr.
From To Date Marks Signature
No. Experiment
1. Study the complete Software
Development Life Cycle (SDLC)
and analyze various activities
conducted as a part of various
phases.
Develop Requirement
2. Specification for a given
problem
1
ExperimentNo:1 Date: //
TITLE: Study the complete Software Development Life Cycle (SDLC) and analyze
various activities conducted as a part of various phases.
OBJECTIVES:
➢ Complete Understanding of Software Development Life Cycle ➢
Importance of SDLC
THEORY:
Software Development Life Cycle, or SDLC is a process used to develop software. It aims to
produce a high-quality system that meets or exceeds customer expectations, works effectively
and efficiently in the current and planned information technology infrastructure, and is
inexpensive to maintain and cost-effective to enhance.
There are different stages or phases within the Software Development Life Cycle and in each
phase, different activities take place. SDLC creates a structure for the development teams to be
able to design, create and deliver high quality software by defining various tasks that need to
happen The life cycle defines a methodology for improving the quality of software and the overall
development process. The methodology within the SDLC process can vary across organizations,
but standards such as ISO/IEC 12207 represent processes that establish a life cycle for software,
and provide a standard for building and maintaining software. The intent of a SDLC process it to
help produce a product that is cost-efficient, effective, and of high quality.
2
1. Requirement Analysis
Software Development Life Cycle begins with Requirement Analysis phase, where the
stakeholders discuss the requirements of the software that needs to be developed to achieve a
goal. The aim of the requirement analysis phase is to capture the detail of each requirement
and to make sure everyone understands the scope of the work and how each requirement is
going to be fulfilled.
It is a normal practice to also discuss how each requirement will be tested and so testers can
add great value in participating in requirement analysis meetings. Depending on which
software development methodology is used, different approaches are taken in moving from
one phase to another. For example, in the waterfall or V model, the requirement analysis phase
are saved in a SRS (Software Requirement Specification) document and needs to be finalized
before the next phase can take place.
2. Design
The next stage of Software Development Life Cycle is the Design phase. During the design
phase, developers and technical architects start the high-level design of the software and
system to be able to deliver each requirement.
The technical details of the design are discussed with the stakeholders and various parameters
such as risks, technologies to be used, capability of the team, project constraints, time and
budget are reviewed and then the best design approach is selected for the product. The
selected architectural design, defines all the components that needs to be developed,
communications with third party services, user flows and database communications as well
as front-end representations and behaviour of each components. The design is usually kept in
the Design Specification Document (DSD)
3. Development Implementation
After the requirements and design activity is completed, the next phase of the Software
Development Life Cycle is the implementation or development of the software. In this phase,
developers start coding according to the requirements and the design discussed in previous
phases. In this the work is divided in modules/units and actual coding is started. Since, in this
phase the code is produced so it is the main focus for the developer. This is the longest phase
of the software development life cycle.
Database admins create the necessary data in the database, front-end developers create the
necessary interfaces and GUI to interact with the back-end all based on guidelines and
procedures defined by the company. Developers also write unit tests for each component to
test the new code that they have written, review each other’s code, create builds and deploy
software to an environment. This cycle of development is repeated until the requirements are
3
4. Testing
Testing is the last phase of the Software Development Life Cycle before the software is delivered
to customers. During testing, experienced testers start to test the system against the requirements.
The testers aim to find defects within the system as well as verifying whether the application
behaves as expected and according to what was documented in the requirements analysis phase.
Testers can either use a test script to execute each test and verify the results. It is possible that
defects are identified in the testing phase. Once a defect is found, testers inform the developers
about the details of the issue and if it is a valid defect, developers will fix and create a new version
of the software which needs to be verified again. This cycle is repeated until all requirements have
been tested and all the defects have been fixed and the software is ready to be shipped.
EVALUATION:
Problem
Understanding Timely Total
Analysis & Mock
Level Completion
Solution (2) (10)
(3) (2)
(3)
4
ExperimentNo:2 Date: / /
THEORY:
A software requirements specification captures complete description about how the system is
expected to perform. It is usually signed off at the end of requirements engineering phase.
Qualities of SRS:
● Correct
● Unambiguous
● Complete
● Consistent
● Ranked for importance and/or stability
● Verifiable
● Modifiable
● Traceable
Types of Requirements:
The below diagram depicts the various types of requirements that are captured during SRS
5
What do you mean by requirement analysis in SDLC?
Functional requirements specify a function that a system or system component must be able
to perform. It can be documented in various ways. The most common ones are written
descriptions in documents, and use cases.
Use cases can be textual enumeration lists as well as diagrams, describing user actions. Each
use case illustrates behavioural scenarios through one or more functional requirements. Often,
though, an analyst will begin by eliciting a set of use cases, from which the analyst can derive
the functional requirements that must be implemented to allow a user to perform each use
case.
● Product details
● Data manipulation
● Data processing
A typical functional requirement will contain a unique name and number, a brief summary, and a
rationale. This information is used to help the reader understand why the requirement is needed, and
to track the requirement through the development of the system.
Non-Functional Requirement: -
Non-functional requirements are in the form of "system shall be ", an overall property of the
system as a whole or of a particular aspect and not a specific function. The system's overall
properties commonly mark the difference between whether the development project has
succeeded or failed. Non-functional requirements - can be divided into two main categories:
● Execution qualities, such as security and usability, which are observable at run
time.
● Evolution qualities, such as test-ability, maintainability, extensibility and
scalability, which are embodied in the static structure of the software system
6
Non-functional requirements place restrictions on the product being developed, the development
process, and specify external constraints that the product must meet.
Static Volumetric.
● Scalability.
● Capacity.
● Availability.
● Reliability.
● Recoverability.
● Maintainability.
● Serviceability.
shop”. Customer can purchase products. Admin can upload products like wheat, rice etc.
Customer can login from his/her ID & Password. Then they can able to purchase products.
Admin also change his profile & he/she also change personal details but cannot change
his/her id or subject.
● User must have good understanding to use the system more efficiently
with the use of appropriate messages given while using the system.
7
• User must have provide shipping method.
• User must have online SMS and Email send to the Customer.
Exercise:
1. Analyse all the functional requirements of Hospital Management system.
2. Analyse all the functional requirements of Time Table Scheduling system.
3. Analyse all the functional requirements of Library management system.
4. Analyse all the functional requirements of Given System
EVALUATION:
Problem
Understanding Timely Total
Analysis & Mock
Level Completion
Solution (2) (10)
(3) (2)
(3)
OBJECTIVES:
➢ Study the benefits of visual modelling
➢ Complete understanding of Rational Rose
.
THEORY:
Visual Modelling
Visual Modelling is a way of thinking about problems using models organized around real-
world ideas. Models are useful for understanding problems, communicating with everyone
involved with the project (customers, domain experts, analysts, designers, etc.), modelling
enterprises, preparing documentation, and designing programs and databases
Visual Modelling
➔ Capture the structure and behaviour of architectures and components.
➔ Show how the elements of the system fit together.
➔ Hide or expose details appropriate for the task.
➔ Maintain consistency between a design and its implement.
Menubar: The menu bar consists of several menus like the file menu, edit menu, view menuetc. All
these menus contain several options.
Toolbar: The toolbar contains the most frequently used actions like New, Open, Save etc…
Browser Window: The browser window displays the views: Use Case View, Logical View,
Component View and Deployment View. Each of these views contains the diagrams.
Diagram Toolbar: The diagram toolbar displays the symbols of the respective type of diagram.
Diagram Window: The diagram window is the place where the user draws the diagrams using
the symbols from the diagram toolbar.
Log Window: This window is used to display error messages, warnings and information messages.
Documentation Window: This window is used to display the documentation related to the symbols
and other aspects.
Page 10of 40
● Deleting from a diagram and the browser
3. Displaying a diagram.
4. Rename a Diagram.
5. Deleting a diagram
Exercise:
1. How to Create a diagram in draw.io
2. Draw a diagram for flow chart of library management system using draw.io
EVALUATION:
Problem
Understanding Timely Total
Analysis & Mock
Level Completion
Solution (2) (10)
(3) (2)
(3)
11
Experiment No: 4 Date: //
OBJECTIVES:
➢ Complete Understanding of Data Dictionary.
➢ Importance of Data Dictionary.
THEORY:
What is Data Dictionary?
A data dictionary is a collection of descriptions of the data objects or items in a data model for
the benefit of programmers and others who need to refer to them. A first step in analysing a
system of objects with which users interact is to identify each object and its relationship to other
objects. The users of the database normally don't interact with the data dictionary, it is only
handled by the database administrators.
Integer 10 1645000001
Employee Unique ID of each
Number employee
12
Phone Integer 10 Phone number of 6583648648
Number employee
Exercise:
1. Prepare data dictionary for Hospital Management system.
2. Prepare data dictionary for Time Table Scheduling system.
3. Prepare data dictionary for Payroll system.
4. Prepare data dictionary for Given System
EVALUATION:
Problem
Understanding Timely Total
Analysis & Mock
Level Completion
Solution (2) (10)
(3) (2)
(3)
13
Experiment No: 5 Date: //
THEORY:
● Actors: The users that interact with a system. An actor can be a person, an
organization, or an outside system that interacts with your application or system.
They must be external objects that produce or consume data.
● System: A specific sequence of actions and interactions between actors and the
system. A system may also be referred to as a scenario.
● Use-cases: sequence of actions.
System : Draw your system's boundaries using a rectangle that contains use cases. Place actors
outside the system's boundaries.
Use Case: Draw use cases using ovals. Label the ovals with verbs that represent the system's
functions.
14
Actors: Actors are the users of a system. When one system is the actor of another system, label
the actor system with the actor stereotype.
Relationships : Illustrate relationships between an actor and a use case with a simple line.
For relationships among use cases, use arrows labeled either "uses" or "extends." A "uses"
relationship indicates that one use case is needed by another in order to perform a task. An
"extends" relationship indicates alternative options under a certain use case.
15
Railway reservation use case diagram example
Exercise:
1. Prepare Use Case diagram for Hospital Management system.
2. Prepare Use Case diagram for Time Table Scheduling system.
3. Prepare Use Case diagram for Payroll system.
4. Prepare Use Case diagram for Given System
5. Prepare Use Case diagram for college Attendance system.
EVALUATION:
Problem
Understanding Timely Total
Analysis & Mock
Level Completion
Solution (2) (10)
(3) (2)
(3)
16
Experiment No : 6 Date: / /
TITLE: Prepare all the levels of DFD diagram for given system.
OBJECTIVES:
➢ Learn Data Flow diagrams
THEORY:
Data Flow Diagram.
➢ Data flow diagram is graphical representation of flow of data in an information
system. It is capable of depicting incoming data flow, outgoing data flow and
stored data.
➢ The DFD does not mention anything about how data flows through the system.
➢ There is a prominent difference between DFD and Flowchart. The flowchart
depicts flow of control in program modules. DFDs depict flow of data in the
system at various levels. DFD does not contain any control or branch elements.
DFD Components
DFD can represent Source, destination, storage and flow of data using the following set of
components -
● Entities - Entities are source and destination of information data. Entities are
represented by a rectangle with their respective names.
● Process - Activities and action taken on the data are represented by Circle or
Round- edged rectangles.
● Data Storage - There are two variants of data storage - it can either be represented
as a rectangle with absence of both smaller sides or as an open sided rectangle
with only one side missing.
● Data Flow - Movement of data is shown by pointed arrows. Data movement is
shown from the base of arrow as its source towards head of the arrow as
destination.
Levels of DFD
17
Level 0 - Highest abstraction level DFD is known as Level 0 DFD, which depicts the entire in
formation system as one diagram concealing all the underlying details. Level 0 DFDs are also
known as context level DFDs.
Level 1 - The Level 0 DFD is broken down into more specific, Level 1 DFD. Level 1 DFD depicts
basic modules in the system and flow of data among various modules. Level 1 DFD also
mentions basic processes and sources of information.
Level 2 - At this level, DFD shows how data flows inside the modules mentioned in Level
1.Higher level DFDs can be transformed into more specific lower level DFDs with deeper level
of understanding unless the desired level of specification is achieved.
18
Exercise:
1. Prepare DFD for given system.
EVALUATION:
Problem
Understanding Timely Total
Analysis & Mock
Level Completion
Solution (2) (10)
(3) (2)
(3)
19
ExperimentNo:7 Date: //
OBJECTIVES:
THEORY:
Symbols
An ER diagram is a means of visualizing how the information a system produces is related.
There are five main components of an ERD:
● A weak entity is an entity that must defined by a foreign key relationship with
another entity as it cannot be uniquely identified by its own attributes alone.
● Actions, which are represented by diamond shapes, show how two entities share
information in the database.
20
In some cases, entities can be self-linked. For example, employees can supervise other
employees.
● A multivalued attribute can have more than one value. For example, an
employee entity can have multiple skill values.
● Connecting lines, solid lines that connect attributes to show the relationships of
entities in the diagram.
21
● ER Diagram for Banking system:
22
Exercise:
1. Prepare ER diagram for Hospital Management system.
2. Prepare ER diagram for Time Table Scheduling system.
3. Prepare ER diagram for Payroll system.
4. Prepare ER diagram for Library management system.
5. Prepare ER diagram for Given System
EVALUATION:
Problem
Understanding Timely Total
Analysis & Mock
Level Completion
Solution (2) (10)
(3) (2)
(3)
23
Experiment No: 8 Date: / /
Objectives:
➢ Detailed understanding of Activity diagram.
Introduction
Activity diagram is another important diagram in UML to describe the dynamic aspects of the
system. 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.
24
Activity Diagram Example - Student Enrollment
This UML activity diagram example describes a process for student enrollment in a
university as follows:
25
Activity diagram for a login page
Many of the activities people want to accomplish online—checking email, managing finances,
ordering clothes, etc.—require them to log into a website. This activity diagram shows the
process of logging into a website, from entering a username and password to successfully
logging in to the system.
26
Exercise:
1. Prepare Activity diagram for Given System.
2. Prepare Activity diagram for Time Table Scheduling system.
3. Prepare Activity diagram for Payroll system.
4. Prepare Activity diagram for Library management system.
EVALUATION:
Problem
Understanding Timely Total
Analysis & Mock
Level Completion
Solution (2) (10)
(3) (2)
(3)
27
Experiment No: 9 Date: / /
TITLE: Calculate FP based Estimation and LOC based Estimation for given
project.
OBJECTIVES:
➢ Detailed understanding Project estimation techniques such as FP based ans LOC
based Estimation.
What is LOC based Estimation
➢ The LOC (Line of Code) is a product size metric in software engineering. Here,
the number of lines in the code are counted and based on the number of lines
the cost is calculated.
➢ There is no definite clear picture of how to count number of lines because the
length and complexity of the code is different in different languages.
➢ It only depends on the length but not on complexity and functionality. Example
There are
• 5 physical line of code.
• 2 logical line of code (printf statement and for statement)
• 1 comment line.
Example:
The problems of lines of code (LOC) – Different languages lead to different lengths of code –
It is not clear how to count lines of code – A report, screen, or GUI generator can generate
thousands of lines of code in minutes – Depending Depending on the application
application, the complexity complexity of code is different.
28
Function Estimated LOC
5,300
2 D geometric analysis
➢ Measure productivity (ex. Number of function points achieved per work hour
expended)
29
➢ Estimate development and support (cost benefit analysis, staffing estimation)
➢ Normalize other measures (Other measures, such as defects, frequently require
the size in function points)
➢ Measure software development and maintenance independently of technology
used for implementation.
➢ As baseline metrics collected from past projects and used in conjuction with
estimation variables to develop cost and effort projections.
➢ A consistent measure among various projects and organizations
The approach is to identify and count a number of unique function types:
● external inputs (e.g. file names)
● external outputs (e.g. reports, messages)
● queries (interactive inputs needing a response)
● external files or interfaces (files shared with other software systems)
● internal files (invisible outside the system)
Each of these is then individually assessed for complexity and given a weighting value which
varies from 3 (for simple external inputs) to 15 (for complex internal files).
The sum of all the occurrences is computed by multiplying each function count with a
weighting and then adding up all the values. The weights are based on the complexity of the
feature being counted. Albrecht’s original method classified the weightings as:
External Input x3 x4 x6
External Input x4 x5 x7
30
External Inquiry x3 x4 x6
Low, average and high decision can be determined with this table :
In order to find adjusted FP, UFP is multiplied by technical complexity factor ( TCF ) which can
be calculated by the formula : TCF = 0.65 + ( sum of factors ) / 100
There are 14 technical complexity factor. Each complexity factor is rated on the basis of its
degree of influence, from no influence to very influencial :
Function points are recently used also for real time systems.
Advantages of FP
1. It is not restricted to code
2. Language independent
3. The necessary data is available early in a project. We need onşy a detailed
specification.
4. More accurate than estimated LOC
31
Drawbacks of FP
1. Subjective counting
2. Hard to automate and difficult to compute
3. Ignores quality of output
4. Oriented to traditional data processing applications
5. Effort prediction using the unadjusted function count is often no worse than
when the TCF is added.
Exercise:
1. Calculate FP based project estimation for any given project.
For LOC based estimation If the estimated project is 33,200 LOC, – then the total estimated
project cost is $ and – the estimated effort is person months.
EVALUATION:
Problem
Understanding Timely Total
Analysis & Mock
Level Completion
Solution (2) (10)
(3) (2)
(3)
Objectives:
➢ Learn about Software Metric.
➢ Detailed understanding of Cyclomatic Complexity and its importance.
33
Flow graph notation for a program:
Flow Graph notation for a program is defines. several nodes connected through the edges.
Below are Flow diagrams for statements like if-else, While, until and normal sequence of flow.
Mathematical representation:
Mathematically, it is set of independent paths through the graph diagram. The
complexity of the program can be defined as - V(G) = E - N + 2
Where,
E - Number of edges
N - Number of Nodes
V (G) = P + 1
Where P = Number of predicate nodes (node that contains condition)
Example i
= 0;
n=4; //N-Number of nodes present in the graph
while (i<n-1) do j = i + 1; while (j<n) do if
A[i]<A[j] then swap(A[i], A[j]); end do; i=i+1;
end do;
34
Computing mathematically,
V(G) = 9 - 7 + 2 = 4
V(G) = 3 + 1 = 4 (Condition nodes are 1,2 and 3 nodes)
Basis Set - A set of possible execution path of a program
1, 7
1, 2, 6, 1, 7
1, 2, 3, 4, 5, 2, 6, 1, 7
1, 2, 3, 5, 2, 6, 1, 7
Basis Path testing is one of White box technique and it guarantees to execute atleast
one statement during testing. It checks each linearly independent path through the
program, which means number test cases, will be equivalent to the cyclomatic
complexity of the program.
This metric is useful because of properties of Cyclomatic complexity (M) -
If (Condition 1)
35
Statement 1 Else
Statement 2 If
(Condition 2)
Statement 3 Else
Statement 4
Cyclomatic Complexity for this program will be 9-7+2=4. As complexity has calculated as 4,
four test cases are necessary to the complete path coverage for the above example.
Steps to be followed:
The following steps should be followed for computing Cyclomatic complexity and test cases
design.
Step 1 - Construction of graph with nodes and edges from the code
Step 2 - Identification of independent paths
Step 3 - Cyclomatic Complexity Calculation
Step 4 - Design of Test Cases
Once the basic set is formed, TEST CASES should be written to execute all the paths.
What is V (G):
Cyclomatic complexity can be calculated manually if the program is small. Automated tools
need to be used if the program is very complex as this involves more flow graphs. Based on
complexity number, team can conclude on the actions that need to be taken for measure.
Following table gives overview on the complexity number and corresponding meaning of v
(G):
Complexity Meaning
Number
1-10
Structured and well written code,High Testability,Cost and
Effort is Less
36
Exercise:
1. Calculate Cyclomatic Complexity for any given program.
EVALUATION:
Problem
Understanding Timely Total
Analysis & Mock
Level Completion
Solution (2) (10)
(3) (2)
(3)
37