Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q.1.4 Q.1.5 Consider the following snippet of code being tested: 1. Print Please enter your age: 2. Read age 3. IF age >= 60
Q.1.4 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 = 60 Q.1.4.1 Calculate the statement coverage achieved for Test Case 1 and provide a brief explanation for your response. Q.1.4.2 Calculate the decision coverage achieved for Test Case 1 and provide a brief explanation for your response. Discuss the importance of component testing. (3) (3) (4) Q.1.4 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 = 60 Q.1.4.1 Calculate the statement coverage achieved for Test Case 1 and provide a brief explanation for your response. Q.1.4.2 Calculate the decision coverage achieved for Test Case 1 and provide a brief explanation for your response. Discuss the importance of component testing. (3) (3) (4)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
The image contains a text question regarding the testing of a code snippet The snippet is a simple ifelse statement that checks whether the age variable is greater than or equal to 60 to print a messa...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started