Test program The following program has been implemented for a newly proposed tax calculation formula for residents of a

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Test program The following program has been implemented for a newly proposed tax calculation formula for residents of a

Post by answerhappygod »

Test program
The following program has been implemented for a newly proposedtax calculation formula for residents of a fictitious country.
// incomeList[]: the array recording the individual incomeitems
// childList[]: the array recording the ages of childrensupported by this person
// parentList[]: the array recording the ages of parentssupported by this person
// calculate the income amount
// calculate the basic tax
// calculate the tax exemption from having children
23 numOfChild--; 24 }
// calculate the tax exemption from having parents
30 }
// the maximum tax exemption is 8000 each person
41}
Your Tasks
(1) Design test cases to achieve 100% branchcoverage on the function "computeTax" (list thebranches covered by each test case). If 100% branchcoverage is not feasible, explainthe reason.Use the minimumnumber of test cases to achieve100% branch coverage
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply