0% found this document useful (0 votes)
21 views

SE - Assignment 3 - 119CS0103

The document contains code snippets and output for 4 assignments calculating software development metrics like function points, effort, development time and staffing requirements using inputs like source lines of code, unadjusted function points, KLOC for different modules. Formulas to calculate technical complexity factor, effort adjustment factor and development effort are included.

Uploaded by

Nitin Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

SE - Assignment 3 - 119CS0103

The document contains code snippets and output for 4 assignments calculating software development metrics like function points, effort, development time and staffing requirements using inputs like source lines of code, unadjusted function points, KLOC for different modules. Formulas to calculate technical complexity factor, effort adjustment factor and development effort are included.

Uploaded by

Nitin Agarwal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

NAME- NITIN AGARWAL

ROLL NO. – 119CS0103

ASSIGNMENT- 3

ANS 1.

#include <stdio.h>

int main() {

int inputs, outputs, inquires, files, interfaces;

printf("Number of user inputs: ");

scanf("%d", &inputs);

printf("\nNumber of user outputs: ");

scanf("%d", &outputs);

printf("\nNumber of user inquiries: ");

scanf("%d", &inquires);

printf("\nNumber of files: ");

scanf("%d", &files);

printf("\nNumber of external interfaces: ");

scanf("%d", &interfaces);

float UFP = (inputs * 4) + (outputs * 5) + (inquires * 4) + (files * 10) +

(interfaces * 7);

float TDI = 14 * 3;

float TCF = (TDI * 0.01) + 0.65;

int FP = UFP * TCF;


printf("\n\nUnadjusted Function Point(UFP) -> %d \n", UFP);

printf("Technical Complexity Factor(TCF) -> %f \n", TCF);

printf("Function Point(FP) is -> %d \n", FP);

return 0;

OUTPUT-

ANS 2.

#include <stdio.h>

int calculateTDI() {

int TDI = 0;

// The complexity adjustment values are: 4, 1, 0, 3, 3, 5, 4, 4, 3, 3, 2, 2, 4, 5.

int ad_values[14] = {4, 1, 0, 3, 3, 5, 4, 4, 3, 3, 2, 2, 4, 5};

printf("Following are the various Complexity adjustment parameters are: \n");


printf("1. Complexity adjustment value for Data Communication: %d \n",
ad_values[0]);

printf("2. Complexity adjustment value for Distributed Data Processing: %d\n",


ad_values[1]);

printf("3. Complexity adjustment value for Performance Objectives: %d \n",


ad_values[2]);

printf("4. Complexity adjustment value for Heavily Used Configuration: %d\n",


ad_values[3]);

printf("5. Complexity adjustment value for Transaction Rate: %d \n",


ad_values[4]);

printf("6. Complexity adjustment value for On-Line Data Entry : %d \n",


ad_values[5]);

printf("7. Complexity adjustment value for End-User Efficiency: %d \n",


ad_values[6]);

printf("8. Complexity adjustment value for On-Line Update: %d \n", ad_values[7]);

printf("9. Complexity adjustment value for Complex Processing: %d \n",


ad_values[8]);

printf("10. Complexity adjustment value for Reusability: %d \n", ad_values[9]);

printf("11. Complexity adjustment value for Conversion & Install Ease: %d\n",
ad_values[10]);

printf("12. Complexity adjustment value for Operational Ease: %d \n",


ad_values[11]);

printf("13. Complexity adjustment value for Multiple-Site Use: %d \n",


ad_values[12]);

printf("14. Complexity adjustment value for Facilitate Change: %d \n",


ad_values[13]);
for(int i=0;i<14;i++) {

TDI += ad_values[i];

return TDI;

int main()

int EI, outputs, inquires, files, interfaces, UFP = 0, weight;

int data[5][3];

data[0][0] = 3; data[0][1] = 4; data[0][2] = 6;

data[1][0] = 4; data[1][1] = 5; data[1][2] = 7;

data[2][0] = 3; data[2][1] = 4; data[2][2] = 6;

data[3][0] = 7; data[3][1] = 10; data[3][2] = 15;

data[4][0] = 5; data[4][1] = 7; data[4][2] = 10;

printf("Weighting factor: \n");

printf("1. 0 -> Simple\n");

printf("2. 1 -> Average\n");

printf("3. 2 -> Complex\n");

printf("Number of user inputs: ");

scanf("%d", &EI);

printf("\nWeighting factor: ");

scanf("%d", &weight);
UFP += data[0][weight] * EI;

printf("\nNumber of user outputs: ");

scanf("%d", &outputs);

printf("\nWeighting factor: ");

scanf("%d", &weight);

UFP += data[1][weight] * outputs;

printf("\nNumber of user inquiries: ");

scanf("%d", &inquires);

printf("\nWeighting factor: ");

scanf("%d", &weight);

UFP += data[2][weight] * inquires;

printf("\nNumber of files: ");

scanf("%d", &files);

printf("\nWeighting factor: ");

scanf("%d", &weight);

UFP += data[3][weight] * files;

printf("\nNumber of external interfaces: ");

scanf("%d", &interfaces);

printf("\nWeighting factor: ");

scanf("%d", &weight);

UFP += data[4][weight] * interfaces;

int TDI = calculateTDI();


float TCF = (TDI * 0.01) + 0.65;

int FP = UFP * TCF;

printf("\n\nUnadjusted Function Point(UFP) is -> %d \n", UFP);

printf("Technical Complexity Factor(TCF) is -> %f \n", TCF);

printf("Function Point(FP) is -> %d \n", FP);

return 0;

OUTPUT-
ANS 3.

#include <stdio.h>

#include <math.h>

int main()

int sloc;

float quality_factor, experience_factor;

printf("Enter Source lines of Code: ");

scanf("%d", &sloc);

printf("\nEnter low quality factor: ");

scanf("%f", &quality_factor);

printf("\nEnter lot of experience factor: ");

scanf("%f", &experience_factor);

// Calculation

float EAF = 1 * quality_factor * experience_factor;

float effort = EAF * 3.6 * pow((sloc / 1000), 1.2);

float develomentTime = 2.5 * pow(effort, 0.32);

printf("\n\nEffort calculated is %f person months\n", effort);

printf("Development Time is %f months ", develomentTime);

return 0;

}
OUTPUT-

ANS 4.

#include <stdio.h>

#include <math.h>

int main()

float kloc_dataEntry, kloc_dataUpdate, kloc_query, kloc_reports;

printf("KLOC for Data Entry : ");

scanf("%f", &kloc_dataEntry);

printf("\nKLOC for Data Update : ");

scanf("%f", &kloc_dataUpdate);

printf("\nKLOC for Query : ");

scanf("%f", &kloc_query);

printf("\nKLOC for Reports : ");


scanf("%f", &kloc_reports);

float high_complexity, high_storage, low_experience, programmer_cap;

float x1, x2, x3, x4, total_Effort, developmentTime, AverageStaff;

printf("\n\nValue for high complexity : ");

scanf("%f", &high_complexity);

printf("\nvalue for high storage : ");

scanf("%f", &high_storage);

printf("\nvalue for low experience : ");

scanf("%f", &low_experience);

printf("\nvalue for low programmer capability : ");

scanf("%f", &programmer_cap);

// Calculation

float EAF = 1 * high_complexity * high_storage * low_experience *


programmer_cap;

x1 = EAF * 2.4 * pow(kloc_dataEntry, 1.05);

x2 = EAF * 2.4 * pow(kloc_dataUpdate, 1.05);

x3 = EAF * 2.4 * pow(kloc_query, 1.05);

x4 = EAF * 2.4 * pow(kloc_reports, 1.05);


total_Effort = x1 + x2 + x3 + x4;

developmentTime = 2.5 * pow(total_Effort, 0.38);

AverageStaff = total_Effort / developmentTime;

printf("\n\nTotal effort is %f person\n", total_Effort);

printf("Average staff size %f \n", AverageStaff);

printf("Total Development time %f months\n", developmentTime);

return 0;

OUTPUT-

You might also like