View the step-by-step solution to:

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

1. 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?
2. 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.

1. 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

1. List the 5 normal boundary values for each of the two variables.
2. Price

X1min, X1min+, X1nom, X1max-, X1max

0, 1.00, 500.00, 999.00, 1000.00

1. pastOrderCount

X2min, X2min+, X2nom, X2max-, X2max

10, 11, 20, 39, 40

Unique Test Cases

1. 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}

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

{<x1nom , x2min>, <x1nom , x2min+>, <x1nom , x2norm >, <x1nom , x2max->, <x1nom , x2max>,

<x1min, x2nom> , <x1min+, x2nom> , c , <x1max, x2nom> }

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

<x1nom , x2min> 500.00 10 5%

<x1nom , x2min+> 500.00 11 5%

<x1nom , x2norm> 500.00 20 5%

<x1nom , x2max-> 500.00 39 5%

<x1nom , x2max> 500.00 40 5%

<x1min, x2nom> 0 20 5%

<x1min+, x2nom> 1.00 20 5%

<x1max, x2nom> 999.00 20 5%

<x1max-, x2nom> 1000.00 20 5%

Robust Boundary Values

1. List the additional robust boundary values.

Price: -1.00, 1001.00

Past Order Count: 9, 41

1. 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

1. What are the equivalence class boundaries in each of the two variables?
2. price
3. pastOrderCount
4. List the intervals within the boundaries in interval notation.
5. List the equivalence classes for valid values in set notation.
6. List the equivalence classes for invalid values in set notation.

Weak Normal Equivalence Class Test Cases

1. List test cases for Weak Normal Equivalence Classes in table format. Number them.
2. Do you see any gaps or problems? If so, what are they?

Strong Normal Equivalence Class Test Cases

1. List additional test cases for Strong Normal Equivalence Classes in table format. Number them.
2. Do you see any gaps or problems? If so, what are they?

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

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

Edge Testing

### Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

• ### -

Study Documents

Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

Browse Documents