#include <bits/stdc++.h>
using
namespace
std;
void
calfp(
int
frates[][3],
int
fac_rate)
{
string funUnits[5] = {
"External Inputs"
,
"External Outputs"
,
"External Inquiries"
,
"Internal Logical Files"
,
"External Interface Files"
};
string wtRates[3] = {
"Low"
,
"Average"
,
"High"
};
int
wtFactors[5][3] = {
{ 3, 4, 6 },
{ 4, 5, 7 },
{ 3, 4, 6 },
{ 7, 10, 15 },
{ 5, 7, 10 },
};
int
UFP = 0;
for
(
int
i = 0; i < 5; i++) {
for
(
int
j = 0; j < 3; j++) {
int
freq = frates[i][j];
UFP += freq * wtFactors[i][j];
}
}
string aspects[14] = {
"reliable backup and recovery required ?"
,
"data communication required ?"
,
"are there distributed processing functions ?"
,
"is performance critical ?"
,
"will the system run in an existing heavily utilized operational environment ?"
,
"on line data entry required ?"
,
"does the on line data entry require the input transaction to be built over multiple screens or operations ?"
,
"are the master files updated on line ?"
,
"is the inputs, outputs, files or inquiries complex ?"
,
"is the internal processing complex ?"
,
"is the code designed to be reusable ?"
,
"are the conversion and installation included in the design ?"
,
"is the system designed for multiple installations in different organizations ?"
,
"is the application designed to facilitate change and ease of use by the user ?"
};
int
sumF = 0;
for
(
int
i = 0; i < 14; i++) {
int
rate = fac_rate;
sumF += rate;
}
double
CAF = 0.65 + 0.01 * sumF;
double
FP = UFP * CAF;
cout <<
"Function Point Analysis :-"
<< endl;
cout <<
"Unadjusted Function Points (UFP) : "
<< UFP << endl;
cout <<
"Complexity Adjustment Factor (CAF) : "
<< CAF << endl;
cout <<
"Function Points (FP) : "
<< FP << endl;
}
int
main()
{
int
frates[5][3] = {
{ 0, 50, 0 },
{ 0, 40, 0 },
{ 0, 35, 0 },
{ 0, 6, 0 },
{ 0, 4, 0 }
};
int
fac_rate = 3;
calfp(frates, fac_rate);
return
0;
}