software-testing

Question 1

Create the control flow diagram and related test cases for the following program segment.

weight = get weight in pounds

height = get height in inches

BMI = (weight / (height x height)) * 703

if (BMI < 18.5)

display “underweight”

else if (BMI >= 18.5 && BMI <= 24.9)

display “healthy weight”

else if (BMI >24.9 && BMI <= 29.9)

display “overweight”

else if (BMI > 29.9)

display “Obesity”

Question 2

Create the control flow graph for the following program segment.

for (int k = 1; k <= 5; ++k)

{

if (gameCheck(stoneCount))

{

System.out.println(“You lost!”);

lostCount = lostCount + 1;

}

stoneCount = computerTurn(stoneCount);

if (gameCheck(stoneCount))

{

System.out.println(“You won”);

++winCount;

}

}

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.