Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

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

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

More Books

Students also viewed these Databases questions

Question

=+ What skills and competencies will enable someone

Answered: 1 week ago

Question

=+to live and work wherever he or she wants?

Answered: 1 week ago

Question

=+How will this affect the recruiting process?

Answered: 1 week ago