Software Lab Sample
Software Lab Sample
INDEX
Experiment No. 1
Aim
Hands on experience on working of CASE TOOLS like Meta Edit+, StarUML and
Rational Rose.
Theory
1. Meta Edit+: Meta Edit+ enables companies to radically improve development
productivity and quality by generating free code directly from models.
First you design the modelling language with meta edit workbench and
then other developing model in modular.
Meta Edit+ Workbenches: It allows a user to build your own modelling tool without
having to write a single level of code.
Steps to define tool:
a. Concepts: Depending on your domain, the concepts come from the
required output to be generate from product components. In use from
product architecture, from product line characteristics.
b. Rules: Meta Edit+ defines tools inside and between models. For one
modelling language a user can define how its concepts can be
related to each other and connections allowed between each
instance.
c. Symbols: the language concepts their connections and associated
rules are illustrated. A user just draws the symbols and their full
graphical behaviour is provided.
d. Generators: You can make reports which check consistency of
models, produce merits, analyse, model linkages produce
documentation and export models.
Meta Edit Modes:
a. Diagram Editor: Tool for creating, managing, maintaining design
information as diagram with advanced features like reusing elements.
b. Matrix Editor: handles design information as matrices.
c. Table Editor: Tool for providing a tabular or form-based view on design
information.
d. Browsers: Meta Edit+ offers general browser for viewing and editing
repository contents.
II. Model and View: It is description of any aspect of software system such as
structure behavior, requirement and so on. A diagram/view element is a visual
geometric symbolic representation of a software model.
III. Fragment: A fragment is a part of a project saved as a separate file with the
extension name. mfj. Any element can be exported as a fragment, but typically
UMLPackage, UMLModel, and UMLSubsystem are the candidates.
Features: Two popular features of rational rose are its ability to provide
iterative development and round-trip engineering.
Usage:
(i) Rational Rose allows developer to take advantages of iterative
development because new application can be created in stages.
(ii) Rational Rose can perform what is called round trip engineering by
going and updating rest of model.
(iii) User can create activity diagrams. The systems engineering activity diagram
can be taken oriented.
Experiment No. 2
Aim:
Apply various elicitation techniques for Payroll Management System.
Theory:
The purpose of this document is to familiarize readers with the software. The
specification describes all hardware and software requirements for the product,
behaviour of it and its components. Software Requirements Specification (SRS) allows
to verify the customer that all his requirements are observed and implemented correctly
by developer.
The intended audience for the SRS reading consists of system end-users (patrons),
customer engineers, software developers.
LIST OF REQUIREMENTS:
1. The employees can easily login the portal by entering their employee id and
password. Also, they can scan at the desired point.
2. The user must link their company banking details with their bank account and
some Identity Card while signing up for the provident fund and tax calculation
system. They need to provide a salary account for the transfer of the salary.
3. The user should be able to make a easily by entering the user id of the recipient
and their PIN code, which they have made while registering on the platform.
4. The login verification system will block the employee if the wrong
password/username is entered more than 3 times.
5. The user should be able to view and challenge his limit on the paid and unpaid
holidays he is left with and shows the regularity of the employee.
6. The history of all attendance, tax/provident fund calculation along with the
attendance criteria made using the platform by the user should be securely
stored and should be visible to the user as well as the administrator.
7. There should be chatbots available for general queries, which will be redirected
to a person if the system can resolve the query.
8. Administrators should be able to set up offers for using the platform for
transactions, which will then be visible to the users and can be claimed by them
if they fulfil the requirements.
9. For the tax calculation system, the employee must specify which taxes are to
automatically deduct from the given bank account and also how the provident
fund should be distributed.
OBJECTIVES:
These are some of the basic facilities that the new and updated payroll management
system will provide: -
Login System:
• The login system includes both the internet as well as the scan method available
in the previous system. For scanning the employee has to scan his card at the
desired location so as to record his time stamp.
• The login system will be integrated via the internet using a particular site, where
the employee has to enter his employee details and password (given beforehand)
and this will update the time stamp of that day.
• It will calculate the salary of an individual depending upon the department, the
post of the employee, bonuses, and other factors. The main feature of this
software is that it will directly send the salary (including bonuses and more)
directly into the bank of your choice.
• It will be integrated with the attendance tracking software so that it can
automatically deduct the required the after all the holidays and taxes.
• The software will show all the possible increments and decrements in one’s salary
on the day and the employee can also raise a request in case of any
miscalculation or any wrong deductions.
• Unlike manual calculations for taxes which can be a mess, the given software will
calculate all the possible taxes that the given employee has to submit during the
specific period.
• These taxes can include home tax, income tax and many more depending upon
which one employee will add to his/her portal.
• These will automatically be deducted from the salary slip and paid to their
respective domains as specified by the employee.
• The following software will check your salary bill and the are added to the desired
PF account of the employee.
• These will be generated at the end of the calculation and it will be calculated on
the predefined algorithm given by a particular company.
• The following software will track the attendance of the employee which will help
the salary calculation software in the salary calculation. It is integrated with the
login module.
• The Software will be open which means that employee can check his/her
attendance at any point of time so that if there are any faults then it can be
clarified as soon as possible.
• The software will generate an alert at the ending of the month so that each
employee can check his/her attendance.
• The software stores all the holidays (paid and non-paid) and the salary and PF bill
for an employee for a current year and through this the employee can access
their details anytime for a given year.
• The employees can anytime can access the details or print and raise any queries
here.
• The System Will Be Connected to a database which will store the employee slips
and holidays for a given year.
• At the end of each month after all clarifications of the employee salary have been
done the system will send all the data back to the backend for storage and are
stored based on employee name.
• The database access will be restricted and can be accessed by only a few
employees of the company so as to force minimal human misuse or errors.
• Security Management: -
•
• The system will be highly secured by using high level of encryption and minimal
human requirement for operation. The Encryption Algorithm will be pre-defined and
one of the most secure in the industry.
• All of the employee data including his bank details, phone number and many more
will be encrypted before adding to the database so that it cannot be misused by
someone else.
•
Discussion
The purpose of drawing an SRS is to get an approximate idea of the requirements of
the case study.
Experiment No. 3
Aim:
Draw Use Case diagram for Payroll Management System.
Theory:
A use case diagram is used to represent the dynamic behaviour of a system. It
encapsulates the system's functionality by incorporating use cases, actors, and their
relationships. It models the tasks, services, and functions required by a system
/subsystem of an application. It depicts the high-level functionality of a system and tells
how the user handles a system.
Following are some rules that must be followed while drawing a use case diagram:
1. A pertinent and meaningful name should be assigned to the actor or a use case of
a system.
2. The communication of an actor with a use case must be defined in an
understandable way.
3. Specified notations to be used as and when required.
4. The most significant interactions should be represented among the multiple no of
5. interactions between the use case and actors.
10
11
Experiment No. 4
Aim:
Draw Use Case diagram for Payroll Management System along with its use case
description.
Theory:
A use case description is a text-based narrative of a functionality comprised of detailed,
step-by-step interaction between the actor and the system. It describes the outcomes
of an action taken to accomplish a specific goal. It also details different paths that can
be followed by defining primary, alternate, and exception flows. Use cases are written
from the point of view of the actor and avoid describing the internal aspects of the
solution.
Description:
The login module will allow all the employees of the company to login via their
employee id and the password or by their ID Card for the day. This system will be
used to track the attendance of the employee.
Basic Flow:
The Customer is asked to enter his/her id and password or their can scan their id
card for entering the system. After entering the credentials, the system will cross
check through the data in database via the storage module. In case of any error, they
can retry or try contacting the admin department.
Pre-Condition: All the employees and admin must have their credentials uploaded
on the database
Related Use Cases: Verify User, Attendance tracking Software, Storage System
12
Description: The following software will track the attendance of the employee as
well of the admin which will help the salary calculation software in the salary
calculation. It is integrated with the login module.
Basic Flow:
This software will initiate as soon as there is a successful login into the system and
will add the required details in the history of the employee automatically. It will then
send the data to the storage module for storage.
Actor: Admin
Pre-Condition: All the admin must have their credentials uploaded on the database.
Post-Condition: None.
Alternative Flow: Admin Access card for any errors in the software or any correction
for miscalculation.
Basic Flow: The given software will take at the ending weeks of each month will take
in effect all the holidays (paid, non-paid) along with other factors and prepare a salary
slip for each employee. Some data from the storage module will be received and
once the slip is created it will send the required data to the storage module which will
store it in the database and will send it to their respective mails at the required time.
Actor: Admin
Pre-Condition: All the admin must have their credentials uploaded on the database.
Post-Condition: None.
13
Special Requirements: Admin access card for any errors in salary calculation or
machine error.
Description: The software stores all the holidays (paid and non-paid) and the salary
and PF bill for an employee for a current year and through this the employee can
access their details anytime for a given year. The employees can anytime can
access the details or print and raise any queries here.
Basic Flow: After verifying his/her details the employee can access his records,
salary slips and his attendance for the past month. After entering the credentials, the
system will cross check through the data in database via the storage module Along
with it the employee can raise any query that he/she founds to be confusing in the
system and the query will be send to the required department for clarifications.
Pre-Condition: All the employees and admin must have their credentials uploaded
on the database
Description: The System Will Be Connected to a database which will store the
employee slips and holidays for a given year. The database access will be restricted
and can be accessed by only a few employees of the company so as to force
minimal human misuse or errors.
Basic Flow: The software on running will ask for verification of the employee of the
admin department. Then it will ask for the employee id of the user whose data has to
be fetched and related operations can be performed. Also, once a employee is
logged in the system or an pay slip is generated the storage module will be contacted
by the other module for storage purposes.
14
Actor: Admin
Description: The following software will check your salary bill and they are added to
the desired PF account of the employee. These will be generated at the end of the
calculation and it will be calculated on the predefined algorithm given by a particular
company.
Basic Flow: At the end of each month the software will generate the provident fund
for the employees depending upon his/her level of responsibility. It will then contact
the salary module for the final changes and later stored in the database.
Pre-Condition: The employees and admins must have their credentials uploaded on
the database
Alternative Flow: In case of any failed transaction or timeout error the screen will
refresh cancelling all the ongoing transaction. The whole process has to be done
again.
Description: Unlike manual calculations for taxes which can be a mess, the given
software will calculate all the possible taxes that the given employee has to submit
15
during the specific period. These taxes can include home tax, income tax and many
more depending upon which one employee will add to his/her portal.
Basic Flow: After the verification of user, the software will ask for the list of taxes to
be paid by the employee and will ask whether to deduct from the current salary or
any existing account of the employee. After the successful transaction a e-slip will be
generated.
Actor: Customer, Admin
Pre-Condition: The employee and admins must have their credentials uploaded on
the database
Alternative Flow: In case of any failed transaction or timeout error the screen will
refresh cancelling all the ongoing transaction. The whole process has to be done
again.
16
Experiment No. 5
Aim:
Draw Entity Relationship diagram for Payroll Management System.
Theory:
An Entity-Relationship model (ERM) is an abstract and conceptual representation of
data. Entity- relationship modelling is a database modelling method, used to produce
a type of conceptual schema or semantic data model of a system, often a relational
database, and its requirements in a top-down fashion. Diagrams created by this
process are called entity relationship diagrams, ER diagrams, or ERDs. The building
blocks: entities, relationships, and attributes. An entity may be defined as a thing which
is recognized as being capable of an independent existence and which can be uniquely
identified.
3. ATTRIBUTES: Attributes are drawn as ovals and are connected with a line to exactly
one entity or relationship set. Key attribute is the unique, distinguishing characteristic
of the entity. For example, an employee's social security number might be the
employee's key attribute.
17
18
Experiment No. 6
Aim:
Draw different levels of DFD for Payroll Management System.
Theory
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. A DFD
shows what kind of information will be input to and output from the system, how the
data will advance through the system, and where the data will be stored.
Levels of DFD:
• Level 0 - Highest abstraction level DFD is known as Level 0 DFD, which depicts the
entire information 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.
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.
19
Diagram
Level 0
Level 1
With a data flow diagram, users are able to visualize how the system will operate, what
the system will accomplish, and how the system will be implement.
20
Experiment No. 7
Aim:
Convert DFD of Payroll Management System into structured chart.
Theory:
Structure Chart represent hierarchical structure of modules. It breaks down the entire
system into lowest functional modules, describe functions and sub-functions of each
module of a system to a greater detail. Structure Chart partitions the system into black
boxes functionality of the system is known to the users but inner details are unknown).
Inputs are given to the black boxes and appropriate outputs are generated.
Modules at top level called modules at low level. Components are read from top to
bottom and left to right. When a module calls another, it views the called module as
black box, passing required parameters and receiving results.
21
22
EXPERIMENT 8
Aim
Develop c code to calculate effort and time period using different forms of COCOMO
model.
Theory
COCOMO (Constructive Cost Model) is a regression model based on LOC, i.e.,
number of Lines of Code. It is a procedural cost estimate model for software projects
and is often used as a process of reliably predicting the various parameters associated
with making a project such as size, effort, cost, time, and quality. It was proposed by
Barry Boehm in 1981 and is based on the study of 63 projects, which makes it one of
the best-documented models. The key parameters which define the quality of any
software products, which are also an outcome of the COCOMO are primarily Effort &
Schedule:
• Effort: Amount of labour that will be required to complete a task. It is measured in
person-months units.
• Schedule: Simply means the amount of time required for the completion of the job,
which is, of course, proportional to the effort put in. It is measured in the units of time
such as weeks, months.
{
double kloc = 0;
double table[3][4] = {{2.4, 1.05, 2.5, 0.38}, {3.0, 1.12, 2.5, 0.35}, {3.6, 1.2,
2.5,
0.32}};
printf("Which model you want to calculate for?\n");
printf("a. Organic Model\n");
printf("b. Semi-Detached Model\n");
printf("c. Embedded Model\n");
char x;
scanf("%c", &x);
printf("Enter the number of lines in kLOC unit: ");
scanf("%lf", &kloc);
float effort = 0, time = 0;
effort = table[x - 'a'][0] * pow(kloc, table[x - 'a'][1]);
time = table[x - 'a'][2] * pow(effort, table[x - 'a'][3]);
printf("Effort = %f Person-Months\n", effort);
printf("Development Time = %f Months\n", time);
return 0;
}
Output
24
25
EXPERIMENT 9
Aim
To develop test cases using boundary value analysis for the classification of a triangle.
Theory
Functional testing is a type of software testing in which the system is tested against
the functional requirements of the system. It is conducted to ensure that the
requirements are properly satisfied by the application. Functional testing verifies that
each function of the software application works in conformance with the requirement
and specification. Boundary Value Analysis(BVA) is one of the functional testings.
Boundary Value Analysis is based on testing the boundary values of valid and invalid
partitions.
The behaviour at the edge of the equivalence partition is more likely to be incorrect
than the behaviour within the partition, so boundaries are an area where testing is likely
to yield defects.
It checks for the input values near the boundary that have a higher chance of error.
Every partition has its maximum and minimum values and these maximum and
minimum values are the boundary values of a partition.
Problem Statement
The triangle problem accepts three integers – a, b, c as three sides of the triangle. The
range for the sides, l, of the triangle are [1,100] where l>0, it returns the type of triangle
– scalene, isosceles, equilateral, not a triangle, formed by a, b and c.
Test Cases
26
27
EXPERIMENT 10
Aim
To develop program to find cyclomatic complexity using DD Path for root of quadratic
equation.
Theory
A decision-to-decision path, or DD-path, is a path of execution (usually through a flow
graph representing a program, such as a flow chart) between two decisions.
A DD-path is a set of nodes in a program graph such that one of the following holds
(quoting and keeping Jorgensen's numbering, with comments added in parenthesis):
1. It consists of a single node with in-degree = 0 (initial node)
2. It consists of a single node without-degree = 0 (terminal node)
3. It consists of a single node with in-degree ≥ 2 or out-degree ≥ 2 (decision/merge
points)
4. It consists of a single node with in-degree = 1 and out-degree = 1
5. It is a maximal chain of length ≥ 1.
Cyclomatic complexity of a code section is the quantitative measure of the number of
linearly independent paths in it. It is a software metric used to indicate the complexity
of a program. It is computed using the Control Flow Graph of the program. The nodes
in the graph indicate the smallest group of commands of a program, and a directed
edge in it connects the two nodes i.e., if second command might immediately follow
the first command.
Code
#include <stdio.h>
#include <conio.h>
#include <math.h>
int main()
{
int a, b, c, validInput = 0, d;
double D;
28
scanf("%d", &b);
printf("Enter the 'c' value: ");
if ((a >= 0) && (a <= 100) && (b >= 0) && (b <= 100) && (c >= 0) && (c <=
100)) {
validInput = 1;
if (a == 0)
validInput = -1;
}
if (validInput == 1) {
d = b * b - 4 * a * c;
if (d == 0) {
printf("The roots are equal and are r1 = r2 = %f\n", -b / (2 * (float)a));
}
else if (d > 0) {
D = sqrt(d);
printf("The roots are real and are r1 = %f and r2 = %f\n", (-b - D) / (2 * a),
(-b + D) / (2
* a));
}
else {
D = sqrt(-d) / (2 * a);
printf("The roots are imaginary and are r1 = (%f, %f) and r2 = (%f, %f)\n",
-b / (2.0 *
a), D, -b / (2.0 * a), -D);
}
}
else if (validInput == -1) {
printf("The values do not constitute a Quadratic Equation.");
}
else {
29
30
DD Path Graph
1 to 10 A Sequential Nodes
11 B Decision Node
12 C Intermediate Node
13 D Decision Node
18 H Intermediate Node
19 I Decision Node
31
22 K Decision Node
31 O Decision Node
Cyclomatic Complexity
In the above DD Path Graph, we can find
Number of Nodes (n) = 19
Number of Edges (e) = 24
Number of Connected Components (P) = 1
(i) V(G) = e – n + 2P = 24 – 19 + 2 = 7
(ii) V(G) = Π + 1 = 6 + 1 = 7 (where Π is the number of predicate nodes contained
in the graph G)
(iii) V(G) = Number of Regions = 7
Therefore, there are 7 independent paths. They are:
1. ABGOQRS
2. ABCDFGOQRS
3. ABGHIJNRS
4. ABGHIKMNRS
5. ABGOPRS
6. ABCDEFGOPRS
7. ABGHIKLNRS
32
EXPERIMENT 11
Aim
To develop equivalence class test cases for classification of a triangle and calculating
previous day for a given date.
Theory
Equivalence Class Testing
In this method, the input domain of a program is partitioned into a finite number of
equivalence classes such that one can reasonably assume, but not be absolutely
sure, that the test of a representative value of each class is equivalent to a test of
any other value. Two steps are required to implementing this method.
1. The equivalence classes are identified by taking each input condition and partitioning
it into valid and invalid classes. For example, if an input condition specifies a range of
values from 1 to 999, we identify one valid equivalence class [1<item<999]; and two
invalid equivalence classes [item<1] and [item>999].
2. Generate the test cases using the equivalence classes identified in the previous step.
This is performed by writing test cases covering all the valid equivalence classes. Then
a test case is written for each invalid equivalence class so that no test contains more
than one invalid class. This is to ensure that no two invalid classes mask each other.
Most of the time, equivalence class testing defines classes of the input domain.
However, equivalence classes should also be defined for the output domain. Hence,
we should design equivalence classes based on input and output domains.
1. Classification of a Triangle
1 50 50 50 Equilateral
2 50 99 100 Scalene
3 99 50 50 Isosceles
33
1 0 50 50 invalid input
2 50 50 50 equilateral
4 50 50 0 invalid input
5 50 50 50 equilateral
7 50 0 50 invalid input
8 50 50 50 equilateral
10 30 30 30 equilateral
11 30 30 45 isosceles
34
12 30 35 40 scalene
13 30 35 35 isosceles
14 30 35 30 isosceles
15 30 25 55 not a triangle
16 30 55 25 not a triangle
35
36
EXPERIMENT 12
Aim
To create a program to predict reliability metric using different models.
Theory
Reliability metrics are used to quantitatively expressed the reliability of the software
product. The option of which metric is to be used depends upon the type of system to
which it applies & the requirements of the application domain.
Some reliability metrics which can be used to quantify the reliability of the software
product are as follows:
MTTF is described as the time interval between the two successive failures. An MTTF
of 200 mean that one failure can be expected each 200-time units. The time units are
entirely dependent on the system & it can even be stated in the number of transactions.
MTTF is consistent for systems with large transactions.
For example, it is suitable for computer-aided design systems where a designer will
work on a design for several hours as well as for Word-processor systems.
To measure MTTF, we can evidence the failure data for n failures. Let the failures
appear at the time instants t1,t2......tn.
MTTF can be calculated as
37
Code
#include <iostream>
#include <math.h>
#include <stdlib.h>
using namespace std;
int main()
{
float choice, fi1, fi2, ef1, ef2, fit1, fidp, et1, et2;
cout << "Implement\n1.Basic Execution Time
Model\n2.Logarithmic Poisson Execution Time \n\nEnter choice :
";
cin >> choice;
if (choice == 1)
{
cout << "Enter failure intensity at the start of execution\n";
cin >> fi1;
cout << "Enter expected number of failures experienced\n";
cin >> ef1;
cout << "Enter number of failures that occur in infinite time\n";
cin >> fit1;
cout << "Enter execution time\n";
cin >> et1;
cout << "Current Failure Intensity:" << (fi1 * (1 - (ef1 / fit1))) <<
endl; cout << "Slope of failure intensity function:" << -fi1 / fit1 << endl;
cout << "No of failures at execution time:" << fit1 * (1 - exp(-(fi1 * et1) /
fit1)) << endl;
cout << "Failure intensity at execution time:" << fi1 * exp(-fi1 *
et1 / fit1) << endl;
}
else if (choice == 2)
{
cout << "Enter failure intensity at the start of execution\n";
cin >> fi2;
cout << "Enter expected number of failures experienced\n";
cin >> ef2;
cout << "Enter failure intensity delay parameter\n";
cin >> fidp;
cout << "Enter execution time\n";
cin >> et2;
38
cout << "Failure intensity at execution time:" << fi2 / ((fi2 * fidp * et2) +
1) << endl;
}
else
cout << "Wrong choice\n";
return 0;
}
Output
39
40
EXPERIMENT 13
Aim
To develop a program to calculate maintenance metrics using different models.
Theory
Effective maintenance of equipment is a critical factor in delivering quality operations
that provide timely resources at a minimal cost. However, those in the maintenance
field understand that equipment reliability does not come easy. Some important
maintenance metrics one should track if they want to improve and optimize their
maintenance operations are:
1. Planned maintenance percentage (PPC)
2. Overall Equipment Effectiveness (OEE)
3. Preventive maintenance compliance (PMC)
41
Code
#include <iostream>
using namespace std;
int main() {
float smh, tmh, choice, ava, per, qual, dp, rep, op, fal, pws, pwc;
cout << "1.Planned maintenance percentage\n2.Overall
Equipment Effectiveness\n3.Preventive maintenance
compliance\nChoose choice:\n";
cin >> choice;
if (choice == 1) {
cout << "Enter scheduled maintenance hours\n";
cin >> smh;
cout << "Enter total maintenance hours\n";
cin >> tmh;
cout << "Planned maintenance percentage = " << smh * 100 /
tmh << "%\n"; }
else if (choice == 2) {
cout << "Enter availabality,performance and quality\n";
cin >> ava >> per >> qual;
cout << "Overall Equipment Effectiveness = " << ava * per *
qual << endl; }
else if (choice == 3) {
cout << "Enter preventive work scheduled\n";
cin >> pws;
cout << "Enter preventive work completed\n";
cin >> pwc;
cout << "Preventive maintenance compliance = " << pwc * 100 /
pws << "%\n"; }
else
42
Output
44