Question

# Hello, I am having a bit of trouble understanding these questions for part of a class activity. I answered most of

the first half of it, however, I'm not sure my answers make sense. The part I am having the most trouble understanding is the range. It seems like the range for price should be 0 to Infinity, since price will keep going up, and same with order count, since you cant have less than 0 orders but you can order an infinite number of times. However, I went off another example we got in class and that is how I came up with the range I used below. Can you let me know if this is the right way to look at the range here?

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.

**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**

0 < P < 1000.00

Min is 0, which is physical because the value for price cannot be negative. The max is 1000.00, which is arbitrary because the price could be higher than 1000.00, but it isn't as likely.

**pastOrderCount**

10 < OrderCount < 40

Min is 10 and Max is 40, they are both arbitrary because it could either be lower than 10 or higher than 40, but it isn't very likely.

**Normal Boundary Values**

- List the 5
*normal boundary values*for each of the two variables. - Price

X1min, X1min+, X1nom, X1max-, X1max

0, 1.00, 500.00, 999.00, 1000.00

- pastOrderCount

X2min, X2min+, X2nom, X2max-, X2max

10, 11, 20, 39, 40

**Unique Test Cases**

- Give the set of unique test cases for the
*normal boundary values*in set notation.

{Price: 0 < Price <1000.00}

{Past Order Count: 10 < Past Order Count < 40}

- Give the test cases in a table format including the expected output for each case.

{<x_{1nom} , x_{2min}>, <x_{1nom} , x_{2min+}>, <x_{1nom} , x_{2norm} >, <x_{1nom} , x_{2max-}>, <x_{1nom} , x_{2max}>,

<x_{1min}, x_{2nom}> , <x_{1min+}, x_{2nom}> , c , <x_{1max}, x_{2nom}> }

** ****Test Case #**** Price Past Order Count ****Expected Output (Discount%)**

<x_{1nom} , x_{2min}> 500.00 10 5%

<x_{1nom} , x_{2min+}> 500.00 11 5%

<x_{1nom} , x_{2norm}> 500.00 20 5%

<x_{1nom} , x_{2max-}> 500.00 39 5%

<x_{1nom} , x_{2max}> 500.00 40 5%

<x_{1min}, x_{2nom}> 0 20 5%

<x_{1min+}, x_{2nom}> 1.00 20 5%

<x_{1max}, x_{2nom}> 999.00 20 5%

<x_{1max-}, x_{2nom}> 1000.00 20 5%

**Robust Boundary Values**

- List the additional
*robust boundary values*.

Price: -1.00, 1001.00

Past Order Count: 9, 41

- List the additional test cases for the
*robust boundary values*in table format.

Test Case # Price Past Order Count Expected Output

<X1nom, X2min-> 500.00 9 0%

<X1nom, X2max+> 500.00 41 10%

<X1min-, X2nom> -1 20 Invalid (Can't pay a negative amount)

<X1max+, X2nom> 1001.00 20 1%

**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?

*Intermediate Add-On*

**Complete this portion in an Acceptable fashion to apply towards base course grades of C or higher**

- See the the Course Grade Determination table in the syllabus to see how many Intermediate Add-Ons you need to submit for a particular letter grade.
- See My Grades in Blackboard to see how many you have submitted and received an Acceptable grade on.
- You may not need to submit one for this assignment.

**Worst-Case Boundary Values**

- List 5 additional
*worst-case boundary values*as pairs. - How many additional cases should there be (in total) for the worst-case.
- List 5 additional
*robust worst-case boundary values*. - How many additional cases should there be (in total) for the robust worst-case.

**Edge Testing**