Assignment No. 02


SEMESTER Fall 2017
CS706 – Software Quality Assurance

Due Date: November 29th, 2017

Instructions to Solve the Assignment

The purpose of assignments is to give you hands on practice. It is expected that students will solve the assignments themselves. Following rules will apply during the evaluation of assignment.

·  Cheating from any source will result in zero marks in the assignment.

·  Any student found cheating in any two of the assignments submitted will be awarded "F" grade in the course.

·  Your assignment will be checked for plagiarism so avoid copy and paste from any source.

No assignment after due date will be accepted.

For any query about the assignment, contact at

Q# 01: (Marks: 24)

Read the following code carefully and identify defects (if any) and explain each defect (at most 3 lines each).

1.  #include <iostream>

2.  using namespace std;

3.  void generateTable(int x, int y){

4.  int result = y / x;

5.  for(int i = 1; i <= 10; i++){

6.  cout<result<" * "<i<" = "<i*result<endl;

7.  }

8.  }

9.  main(){

10.  int found;

11.  int data[10];

12.  for(int i = 0; i < 10; i++){

13.  for(int j=0; j < 10; j++){

14.  found++;

15.  }

16.  }

17.  cout<"Loops executed "<found<" times"<endl;

18.  for(int i = 0; i<= 10; i++){

19.  data[i] = 0;

20.  }

21.  int first, second;

22.  cout<"Enter first number: ";

23.  cin>first;

24.  cout<"Enter second number: ";

25.  cin>second;

26.  cout<"Subtract first number by second and show math table of resut"<endl;

27.  generateTable(first, second);

28.  int rem = first%2;

29.  if(rem = 0){

30.  cout<"First number is even"<endl;

31.  }

32.  else{

33.  cout<"First number is odd"<endl;

34.  }

35.  }

Note: Mention line number where defect exists and provide explanation against that line

Q# 02: (Marks: 6)

Coupling refers to how many dependencies there are between modules and the nature of the links. Based on the nature of dependency, there are different type of coupling like data coupling, stamp coupling, content coupling and control coupling etc. You are required to identify the type of coupling that the following statements represent. Justify your answer with solid reason.

i.  ModuleA``branches'' or ``falls through'' into ModuleB(by containing aGOTOstatement that transfers control somewhere into the middle of ModuleB).

ii.  ModuleArefers to, or changes, ModuleB's internal (and, again, ``private'') data

iii.  ModuleAchanges one of the statements in ModuleB's object code.

Q# 03: (Marks: 20 (5+7+8))

Read the research paper titled “An Efficient Approach for Model Based Test Path Generation”. (The paper is attached with this assignment package).
You are required to write a summary (a paragraph at most 15 lines i.e 5 line each) of this paper which should include the following:

1.  Need for the research

2.  Proposed approach

3.  Strengths and weaknesses of the paper.

GOOD LUCK

======Ended ======