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.Write a Junit test and use the test cases. Write a Junit test and use the test cases.

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter20: Queuing Theory
Section20.10: Exponential Queues In Series And Open Queuing Networks
Problem 10P
icon
Related questions
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 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.Write a Junit test and use the test cases.

Write a Junit test and use the test cases.

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Public key encryption
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole