Professional Documents
Culture Documents
Program - 2: Objective
Program - 2: Objective
Program - 2: Objective
Objective: Write a program to implement Walston-Felix Model and SEL Model and compare
both.
Theory:
A model may be static or dynamic. In a static model, a single variable is taken as a key element for
calculating cost and time. In a dynamic model, all variable are interdependent, and there is no basic
variable.
Static, Single Variable Models: When a model makes use of single variables to calculate desired
values such as cost, time, efforts, etc. is said to be a single variable model. The most common
equation is:
C=aLb
Where C = Costs
L= size a and b are
constants
The Software Engineering Laboratory established a model called SEL model, for estimating its
software production.
Static, Multivariable Models: These models are based on method (1), they depend on several
variables describing various aspects of the software development environment. In some model,
several variables are needed to describe the software development process, and selected equation
combined these variables to give the estimate of time & cost. These models are called multivariable
models.
Algorithm:
Calculating Effort in SEL and Walston-Felix model:
1
E=1.4L0.93
E=5.2L0.91
D=4.1L0.36
Code:
#include <bits/stdc++.h>
using namespace std;
double KLOC_WF(double e)
{
double f = pow((e / 5.2), (1 / 0.91));
return f;
}
double KLOC_SEL(double e)
{
double f = pow((e / 1.4), (1 / 0.93));
return f;
}
void seduration(double loc)
{
double duration = 4.6 * (pow(loc, 0.26)); // duration = duration*1000; cout<<"\n Du
ration for SEL : "<<duration;
}
void wfduration(double loc)
{
double duration = 4.1 * (pow(loc, 0.36)); // duration = duration*1000; cout<<"\n Du
ration for W-F : "<<duration;
}
void productivity(double loc, double f)
{
f = f / 12;
double product = 1000 * (loc / f);
2
cout << "\nProductivity : " << product;
}
void seavrManing(double f, double loc)
{
double duration = 4.6 * (pow(loc, 0.26)); // duration = duration / 1000; double man
ing = f/duration; cout<<"\nAverage Manning SEL: "<<maning;
}
void wfavrManing(double f, double loc)
{
double duration = 4.1 * (pow(loc, 0.36)); // duration = duration / 1000; double man
ing = f/duration; cout<<"\nAverage Manning for W-f: "<<maning;
}
int main()
{
system("color f0");
cout << "\nEnter the effort in man-month : ";
double f;
cin >> f;
double l = KLOC_SEL(f);
double k = KLOC_WF(f);
cout << "\nNumber of lines of source code :";
cout << "\nThe lines of code as per SEL is " << l << " kLOC ";
cout << "\nThe lines of code as per SEL is " << k << " kLOC";
cout << "\n\nDuration in months :";
seduration(l);
wfduration(k);
cout << "\n\nProductivity is the lines of code produced per persons/month (year) :"
;
productivity(l, f);
productivity(k, f);
cout << "\n\nAverage manning is the average number of persons required per month in
the project :";
seavrManing(f, l);
wfavrManing(f, k);
}
3
Output:
Results:
The experiment helped us in successfully implementing SEL and Walston-Felix Model for Line of
Source Code, effort, schedule and productivity estimation.