Description
For the questions below, use the following
function:
int
discountPercent(double price, int pastOrderCount)
returns the percent discount to be given, when
given the price of the merchandise, and the number of orders the customer has
placed in the past.
Past Order Count
|
Percent Discount
|
pastOrderCount < 10
|
0%
|
10 ≤ pastOrderCount ≤ 40
|
5%
|
40 < pastOrderCount
|
10%
|
Orders over $1000.00 are given an automatic,
additional 1% discount.
- List the valid range of values for each of the two
variables. Give the minimum and maximum, and whether each extreme is a
"physical" limit or an arbitrary limit. If it's an arbitrary
limit, why did you choose that limit?
- price
- pastOrderCount
- List the 5 normal boundary values for
each of the two variables.
- price
- pastOrderCount
- Give the set of unique test cases for the normal
boundary values in set notation.
- Give the test cases in a table format including the
expected output for each case.
- List the additional robust boundary values.
- List the additional test cases for the robust
boundary values in table format.
- What are the equivalence class boundaries in each of
the two variables?
- price
- pastOrderCount
- List the intervals within the boundaries in interval
notation.
- List the equivalence classes for valid values in set
notation.
- List the equivalence classes for invalid values in set
notation.
Weak Normal Equivalence Class Test Cases
- List test cases for Weak Normal Equivalence Classes in
table format. Number them.
- Do you see any gaps or problems? If so, what are they?
Strong Normal Equivalence Class Test Cases
- List additional test cases for Strong Normal
Equivalence Classes in table format. Number them.
- Do you see any gaps or problems? If so, what are they?