Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using the information below, complete a function point analysis in order to use

ID: 3850698 • Letter: U

Question

Using the information below, complete a function point analysis in order to use the basic COCOMO model to estimate the duration and number of people needed to develop an application using C++. Assume that the project is relatively simple and straightforward and that the project team is familiar with both the problem and technology.

Complexity Low Average High
-----------------------------------------------------------------------
Internal logical files (ILF) __x7=__ __x10=__ __x15=__
External interface files (EIF) __x5=__ __x7=___ __x10=__
External input (EI) __x3=__ __x4=___ __x6=__
External output (EO) __x4=__ __x5=___ __x7=__
External inquiry (EQ) __x3=__ __x4=___ __x6=__
-----------------------------------------------------------------------

Complexity Low Average High
-----------------------------------------------------------------------
Internal logical files (ILF) 4 2 0   
External interface files (EIF) 0 1 0
External input (EI) 3 2 0
External output (EO) 5 7 3
External inquiry (EQ) 2 5 2
-----------------------------------------------------------------------

General System Characteristic Degree of Influence
-----------------------------------------------------------------------
Data communications 2
Distributed data processing 3
Performance 3
Heavily used configuration 4
Transaction rate 4
Online data entry 2
End user efficiency 2
Online update 2
Complex processing 2
Reusability 3
Installation ease 2
Operational ease 2
Multiple sites 1
Facilitate change 1
-----------------------------------------------------------------------

Language Average Source LOC per Function Point
-----------------------------------------------------------------------
Basic 107
C 128
C++ 53
COBOL 107
Delphi 29
Java 53
Visual Basic 5 29
-----------------------------------------------------------------------

Explanation / Answer


#include<cstdlib>
#include<iostream>
#include<fstream>
#include<string.h>
#include<cmath>
using namespace std;
int mathsine(char *str){
int len=strspn(str,"//");
return len;
}
int mathmultiply(char *str){
int len=strspn(str,"/*");
return len;
}

int countExpComm(char *fname){
int SIZE=100;
char str[SIZE];
int ln=0;
int lbegincomm=0;
int lendcomm=0;
bool first=false;
bool second=false;
ifstream in(fname,ios::in);
if(!in){
cout<<"Could not open the file!";
return(100);
}
while(in.getline(str,SIZE)){
ln++;

if (mathsine(str)==2)
ln--;
else if(mathmultiply(str)==2){
if(first==false){
first=true;
lbegincomm=ln;
}
else{
second=true;
lendcomm=ln;
}
}
if(first==true && second==true)
{

ln=ln-(lendcomm-lbegincomm+1);
first=false;
second=false;
}

}

in.close();
return ln;
}
//Count blank lines
int countBlankLine(char *fname){
char ch;
char prech='';
int lblank=0;
ifstream in(fname,ios::in);
if(!in){
cout<<"Could not open the file!";
return(100);
}
while(in.get(ch)){
if(ch==' ' && prech==' ')
lblank++;
prech=ch;
}

in.close();
return lblank;
}

//calculate calclloc
int calclloc(char *fname){
return(countExpComm(fname)-countBlankLine(fname));

}
void cocomoGen(int loc){
float eaf, e, effort, duration, se, person, ksloc;
float c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17;
float s1, s2, s3, s4, s5;
cout<<"CALCULATE EFFORT, DURATION, AND PEOPLE REQUIRED TO COMPLETE A SOFTWARE PROJECT"<<endl;
cout<<"=============================cocomoGen II========================"<<endl;
cout<<"================Number of Lines Of Code (LOC)========================="<<endl;
cout<<"LOC = "<<loc<<endl;
cout<<"=============================CULCULATE EAF====================="<< endl;
cout<<"EAF = product (All 17 Cost Drivers)"<<endl;
cout<<"=============Please input all 17 cost driver ==========="<<endl;
cout<<"1. Programmer capability: ";
cin>>c1;
cout<<"2. Required system Reliability: ";
cin>>c2;
cout<<"3. Complexity of system modules: ";
cin>>c3;
cout<<"4. Extent of documentation required: ";
cin>>c4;
cout<<"5. Size of database used: ";
cin>>c5;
cout<<"6. Required percentage of reusable components: ";
cin>>c6;
cout<<"7. Execution time constraint: ";
cin>>c7;
cout<<"8. volatility of development platform: ";
cin>>c8;
cout<<"9. Memory constraints: ";
cin>>c9;
cout<<"10. Capability of project analysts: ";
cin>>c10;
cout<<"11. Personnel continuity: ";
cin>>c11;
cout<<"12. Programmer experience in project domain: ";
cin>>c12;
cout<<"13. Analyst experience in project domain: ";
cin>>c13;
cout<<"14. Language and tool experience: ";
cin>>c14;
cout<<"15. Use of software tools: ";
cin>>c15;
cout<<"16. Development schedule compression: ";
cin>>c16;
cout<<"17. Extent of multisite working and quality of inter-site communications: ";
cin>>c17;
eaf=(c1*c2*c3*c4*c5*c6*c7*c8*c9*c10*c11*c12*c13*c14*c15*c16*c17);
cout<<"==> EAF Value = "<<eaf<<endl;
cout<<"=====================CALCULATE E Value========================"<< endl;
cout<<"E = 1.01 + sum(All 5 Scale Drivers)"<<endl;
cout<<"=============Please input all 5 Scale Driver ==========="<<endl;
cout<<"1. Precedentedness: ";
cin>>s1;
cout<<"2. Development Flexibility: ";
cin>>s2;
cout<<"3. Architeture/Rise Resolution: ";
cin>>s3;
cout<<"4. Team Cohesion: ";
cin>>s4;
cout<<"5. Process Maturity: ";
cin>>s5;
e= 1.01 + (s1+s2+s3+s4+s5);
cout<<"==> E = "<<e<<endl;
cout<<"==================CULCULATE EFFFORT====================="<< endl;
cout<<"Effort = 2.94 * EAF * (KSLOC)^E"<<endl;
cout<<"Where KSLOC = LOC/1000"<<endl;
ksloc=loc/1000;
cout<<"==>KSLOC = "<<ksloc<<endl;
effort=2.94*eaf*pow(ksloc,e);
cout<<"Effort = "<<effort<<" person-months"<<endl;
cout<<"=================CULCULATE DURATION====================="<< endl;
cout<<"Duration = 3.67 * (Effort)^SE"<<endl;
cout<<"Where SE = 0.28 + 0.2 * (E - 1.01)"<<endl;
se= 0.28 + (0.2 * (e - 1.01));
cout<<"==> SE = "<<se<<endl;
duration = 3.67 * pow(effort,se);
cout<<"Duration = "<<duration<<" months"<<endl;
cout<<"==============CULCULATE NUMBER OF PEOPLE================"<< endl;
cout<<"Person = Effort/Duration"<<endl;
person=effort/duration;
cout<<"Person = "<<person<<" people"<<endl;
cout<<"========================END OF CODE============================="<< endl;
}

int main(){
char fname[100];
cout<<"Enter your file name:";
gets(fname);
cocomoGen(calclloc(fname));
system("PAUSE");
return 0;
}