Question: The system for discount calculation takes as the input two values: NumberofTransactions representing the total number of transactions for a given client TotalAmount Spent representing

 The system for discount calculation takes as the input two values:

The system for discount calculation takes as the input two values: NumberofTransactions representing the total number of transactions for a given client TotalAmount Spent representing the total amount spent by this client during these transactions Assume that each test case input is a pair (NumberOfTransactions, TotalAmount Spent). Consider the code shown in Figure 3 describing the business rules for this system. 1. IF NumberOfTransactions > 10 THEN 2. IF TotalAmount Spent > RM500 THEN 3. discount != 5% ELSE 4. discount := 2% ELSE 5. discount := 0% (a) Design a test case that should result in admitting the 5% discount. Propose a suitable test data for the test case. (b) What is the statement coverage for the following test suite: (9, RM600), (10, RM200)? (c) What is the decision coverage for the following test suite: (15, RM50), (20, RM750)? (d) Design the set of test cases that achieves the 100% statement coverage. (e) Based on your answer in (d), determine if additional test cases are needed to achieve the 100% decision coverage. [4 marks [2 marks] [2 marks] [6 marks) [1 mark] Paragraph B. 1 Answer for (a)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!