Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Spiro, Ethan Prescott <spiroe@onid.oregonstate.

edu>
 
I noticed there was some confusion regarding test cases and reflections for assignment #2. I believe I am on the
right track, but would love some confirmation. I am happy to post these to Piazza as examples, if they are on the
right track, but don't know if this is allowed. Posted below.

For #2 (even though we didn't need a test plan)


Test Case Input Values Driver Functions Expected Outcomes Observed Outcomes
main() Loop back to the question Loop back to the question
Input too low Input < 0
do…while input < 0 prompting user for input prompting user for input
main() Throws an exception from Throws an exception from
Input at 0 Input = 0
try, throw, catch in main main main
Calls the function
main() Calls the function recursively
Input in correct recursively to that depth
0 < input <= 10 calling recursive to that depth and throws an
range and throws an exception
function exception at that level
at that level
Calls the function
main() Calls the function recursively
Input extreme recursively to that depth
Input = 1 calling recursive to that depth and throws an
low and throws an exception
function exception at that level
at that level
Calls the function
main() Calls the function recursively
Input extreme recursively to that depth
Input = 10 calling recursive to that depth and throws an
high and throws an exception
function exception at that level
at that level
main() Loop back to the question Loop back to the question
Input too high Input > 10
do…while input > 0 prompting user for input prompting user for input

for #4 (where a test plan was required)


Test Case Input Values Driver Functions Expected Outcomes Observed Outcomes
n/a
getProductID(productIds, products,
First call (we aren’t writing a 8 8
5, "mouse")
function)
getProductID(productIds, products,
Second call n/a 13 13
5, "camera")
getProductID(productIds, products, Exception
Third call n/a Exception thrown
5, "laptop") thrown

Thanks for your time,


Ethan
 
 

You might also like