Question
Question 1: Suppose that we test a discount system in some e-shop. The system can send a loyalty card to a client and admit a
Question 1: Suppose that we test a discount system in some e-shop. The system can send a loyalty card to a client and admit a discount of 0% (no discount), 5%, or 10% according to the following rules:
No discount is the default discount option.
A nonregistered user has 0% discount by definition.
If a registered user spent more than $1000 in the previous shopping sessions, and there were 19 or less shopping sessions, admit 5% discount.
If a registered user spent more than $1000 in the previous shopping sessions and there were at least 20 shopping sessions, admit 10% discount.
A loyalty card is sent only to registered customers who spent more than $1000 or had at least 20 shopping sessions.
Give the complete decision table
Design test cases for the requirements
Write a java code for the given requirement
Write a Junit test and use the test cases.
Report the output of the test. Report if there are any defects and fixes.
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