Sale!

COMP 5710 ASSIGNMENT 6 SOLVED

$35.00 $21.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (8 votes)

Problem Descriptions:
You have just purchased a stereo system with price y with the following two credit plan
choices: (1) down payment d < y/2, with interest rate r(%) per month of the remaining
balance, and payoff in 12 months; and (2) down payment d >= y/2, with interest rate of
r/2, and payoff in 6 months.
A function, cost calculates the total cost you pay for this stereo system. It takes in 3
parameters: (y, d, r) and returns the total payment as y + (y – d) * (r/100) * 12 when d <
y/2 or y + (y – d) * (r/2/100) * 6 when d >= y/2
y: a positive float
d: a positive float
r: a positive float
Use functional equivalence partitioning approach to design test cases for this function.
You should have at least three levels of partition. You must show your partitioning tree.
Generate one test case for each leaf node. Some invalid test cases must also be
designed
Note each test case should look like:
((input_y, input_d, input_r), expected_output)
For example:
((1000, 500, 5), 1075)
((1000,200,2), 1192)
((1500, -1.5, -5), exception)
((‘a’, ‘b’, ‘c’), exception)