You are on page 1of 5

Assignment 07

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

Sector I-14 Main Campus, Islamabad, Pakistan


Ph. +92 51- 8446000-8 Cell: #277
Assignment 07 Solution
Measuring and analyzing defect identified through BB and WB in
previous Assignments.
We need the following elements for measuring the requirements.
 Quality requirements
 Quality factors
 Quality sub-factors
 Metrics

Measuring and Analyzing defect Identified through Defect


Prevention Testing

A. Defect detected in Requirements


Quality requirements Quality factors Quality sub-factors Metrics
Percentage weight of each assessment type. Functionality Accuracy The total
The total weight assigned to the selected weight must
assessment type. The total percent weight to be equal to
be equal to 100. 100

Metric Graph

Measurement Analysis through Error Prevention


120
100 100 100 100 100 100 100 100 100 100
100 90
80
%GE OF ASSIGNEMNT

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}

Test Input (Salary) ECP Expected Outcome

1 25000 {0 to 9} Valid Input /Accepted

2 24999 {Salary>25000} Invalid Input/ Rejected

3 25001 {Salary<=75,000} Valid Input /Accepted

4 74999 {Salary<=75,000} Valid Input /Accepted

5 75000 {Salary<=75,000} Valid Input /Accepted

6 75001 {Salary<=75,000} Invalid Input / Rejected

MEASUREMENT ANALYSIS THROUGH BBT


Test Case 1 Test Cases 02 Test Case 03 Maximum Salary Minimum Salary

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

Quality requirements Quality factors Quality sub-factors Metrics


Calculate the average marks of student Efficiency Time Behavior If avg is above 50 only
then student will be pass
Measurement Analysis

Measurement Analysis through WBT


12

10

8
test cases

0
Branch 01 Branch 02 Branch 03 Branch 04
Error w.r.t time

Path 01 Path 02 Path 03 Acceptable Errors

You might also like