Q.1.5 Consider the following snippet of code being tested: 1. Print “Please enter your age: “ 2. Read age 3. IF age >= 60 4. Print “Qualify for pensioner’s discount” 5. ELSE 6. Print “Do not qualify for pensioner’s discount” 7. ENDIF Assume you apply the following test case to the code snippet above: Test Case 1 : age = 93 Q.1.5.1 Calculate the statement coverage achieved for Test Case 1 and provide a brief explanation for your response. (3) Q.1.5.2 Calculate the decision coverage achieved for Test Case 1 and provide a brief explanation for your response

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 20PE: When you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making...
icon
Related questions
Question

Q.1.5 Consider the following snippet of code being tested:
1. Print “Please enter your age: “
2. Read age
3. IF age >= 60
4. Print “Qualify for pensioner’s discount”
5. ELSE
6. Print “Do not qualify for pensioner’s discount”
7. ENDIF
Assume you apply the following test case to the code snippet above:
Test Case 1 : age = 93
Q.1.5.1 Calculate the statement coverage achieved for Test Case 1 and provide
a brief explanation for your response.
(3)
Q.1.5.2 Calculate the decision coverage achieved for Test Case 1 and provide a
brief explanation for your response

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning