Question: Please identify the test cases for the following code segment using basis path testing: Procedure SaleSalary (n: integer, key, task : array[1..n] of integer, name:

  1. Please identify the test cases for the following code segment using basis path testing:

Procedure SaleSalary (n: integer, key, task : array[1..n] of integer, name: array[1..n] of string, level : integer, personname: string)

var j, salary: double; promotion : double

begin

salary := 0;

i := 0;

personname := null;

while ( i < n && level < 4) do

update personname;

name[i] = personname;

i = i + 1;

enddo

for j := 1 to n do

if (key[j] = task[j] && level > 0) then salary := salary + 100

promotion := salary * task / key;

if (promotion < 0.2) then level := 0

else if (promotion >= 0.2 && promotion < 0.5) then level := 1

else if (promotion >= 0.5 && promotion < 0.8) then level := 2

else level := 3

end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!