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

For the Decision Table 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.
Path Testing
For the Path Testing questions below, use the following code:
public void play(){
String src = null;
String dest = null;
LinkedList srcPile = null;
boolean gameOver = false;
while (!gameOver){
displayTableau();
do {
System.out.print("
Move top card from (D, W0, W1, W2, W3, or Q to quit):
");
src = in.nextLine();
if (src.toUpperCase().charAt(0)=='Q'){
gameOver = true;
}
} while (!gameOver && (srcPile = getSrcPile(src))== null);
if (!gameOver){
System.out.print("
to (F0, F1, F2, F3, W0, W1, W2, W3):
");
dest = in.nextLine();
addToDestPile(dest, srcPile);
}
gameOver = checkForGameOver(gameOver);
}
}
Rule Counts
1. What is the maximum number of rules for this function (if we do not collapse any.)
2. Show your Decision Table from the Base Assignment
o Annotate the columns with the number of rules each covers.
DD-Path Node Case Definitions
1. For the DD-Path Graph you create and add the Case Definition (1-5) to your table for each node in that DD-Path Graph.

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!