Question
(1) Design test cases to achieve the statement coverage on the function computeTax (list the statements covered by each test case using the line number
(1) Design test cases to achieve the statement coverage on the function computeTax (list the statements covered by each test case using the line number of each statement). If it is not feasible, explain the reason. Use the minimum number of test cases to achieve the statement coverage.
(2) Design test cases to achieve path coverage on the function computeTax (list the path covered by each test case). If it is not feasible, explain the reason. Use the minimum number of test cases to achieve the path coverage. For this portion, you can earn extra credit by creating a control flow chart diagram.
(3) Design test cases to achieve loop coverage (see below) on the function computeTax (list the loops covered by each test case). If it is not feasible, explain the reason. Try your best to use the minimum number of test cases to achieve the loop coverage. Consider a loop covered if at least in one test the loop body was executed 0 times, in a second test the body was executed exactly once, and in another test the body was executed more than once.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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