Question: Examine the following code. Is it possible to cover all statements and paths with a single test? //a bookstore offers a 10% discount if

Examine the following code. Is it possible to cover all statements and paths with a single test? //a bookstore offers a 10% discount if you buy 5 or more books and spend $50 or more //discounts are also offered if you are a preferred customer (unrelated to purchase) //premium customers received an additional $10 discount on any purchase //select customers receive an additional $5 if(booksPurchased >=5 || moneySpent >=50) {totalDue moneySpent * .9; } } switch (customerLevel) { case "premium": = {totalDue 10; } break; case "select": {totalDue = 5; } break; a) it depends on the user input b) no c) yes
Step by Step Solution
3.42 Rating (152 Votes )
There are 3 Steps involved in it
Answer b no Explanation It is not possible to cover all statements and paths with a single test for ... View full answer
Get step-by-step solutions from verified subject matter experts
