Question: Function For the questions below, use the following function: int discountPercent ( double price, int pastOrderCount ) returns the percent discount to be given, when

Function
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 <100%
10<= pastOrderCount <=405%
40< pastOrderCount 10%
Orders over $1000.00 are given an automatic, additional 1% discount.
Ranges
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
Normal Boundary Values
List the 5 normal boundary values for each of the two variables.
price
pastOrderCount
Unique Test Cases
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.
Robust Boundary Values
List the additional robust boundary values.
List the additional test cases for the robust boundary values in table format.
Equivalence Classes
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?

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!