Professional Documents
Culture Documents
Submitted to:
Dr. Rizwan bin Faiz
HOD Faculty of Computing
Submitted by:
Shahzad Ahmed Khan
MS-SE (Semester 01)
CMS No. 28534
Subject: Software and System Quality
Assignment Number:
Assignment 07 Solution
Dated: 19-04-2019
Metric Graph
80 70
60
60
40
40
20
20 10
0
0 20 40 60 80 100 120
NO OF ERRORS
Requirement: Providing Bonus to employees
Suppose that a company is providing extra benefit to employees on the basis of salary. The range of the salary
is RS 25000 to 75000.The benefit is providing on the following requirements:
1. The benefit will be given on maximum salary of RS 75,000
2. The benefit will be given on minimum salary of RS 25,000
Inputs: Salary
Valid Classes:
1. {0 to 9}
2. {Salary<=75,000}
3. {Salary >=25,000}
Invalid Classes:
1. {0.00, 1.2, 9.99}
2. {Empty}
90000
80000
70000
SALARY INPUT
60000
50000
40000
30000
20000
10000
0
MONTH 1 MONTH 2 MONTH 03 MONTH 4
ERROR W.R.T TIME
Measuring and analyzing defect Identified through WB Testing
Line Code:
Number
1 #include<stdio.h>
2 #include<stdlib.h>
3
4 int main(int argc, char *argv[])
5 {
6 int num_student, marks, subject, total;
7 num_student=1;
8 while (num_student<=40)//the marks of 40 students will be recorded
9 {
10 total =0;
11 subject=1;
12 while(subject<=5)
13 {
14 printf("\n Enter Marks %d :\t ", subject);
15 scanf("%d" ,&marks);
16 total = total+marks;
17 subject ++;//total of 05 subject marks will be input from user
18 }
19 average = total/5;
20 if (average >=50)
21 printf("\n Pass....... Average marks = %f :" ,average);
22 else
23 printf("Fail....... Average marks = %f :" ,average);
24 num_student++;//increament in the number of student after every ittearation
25 }
26 printf("End of Program”); }
Test ID Path Inputs Output
Marks Marks Marks Marks Marks 05 ECP for All input
01 02 03 04 Marks
1 1 45 65 78 34 56 {0--9} Pass…….Average
marks = 55.000000
Flow Paths
Path 01: 1-2-3-4-5-6-7-8- 9-10-11-15-18-11-8-19-20-21-24-26
Path 02: 1-2-3-4-5-6-7-8-19-20-23-24-26
Path 03: 1-2-3-4-5-6-7-8-9-10-11-12-8-19-21-24-26
Path 04: 1-2-3-4-5-6-7-8-9-10-11-8-19-23-24-26
10
8
test cases
0
Branch 01 Branch 02 Branch 03 Branch 04
Error w.r.t time