Answered step by step
Verified Expert Solution
Link Copied!

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

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions