This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
cs-142:cougar-cash-with-input-validation-and-user-confirmation [2015/05/11 14:53]
cs-142:cougar-cash-with-input-validation-and-user-confirmation [2015/05/12 13:12] (current)
Line 11: Line 11:
 ==Solution== ==Solution==
 <code cpp> <code cpp>
 +Test Case 1:
 +Input: 8.50 (input less than initial balance)
 +Output: balance is 1.50
 +Actual: balance is 1.50
 +Test Case 2:
 +Input: 15.00 (input greater than initial balance), then say Yes to prompt to charge card
 +Output: reprompt, balance is 0, owes 5.00
 +Actual: reprompt, balance is 0, owes 5.00
 +Test Case 3:
 +Input: 0 (border case)
 +Output: balance is 10
 +Actual: balance is 10
 +Test Case 4:
 +Input: -1 (negative example)
 +Output: reprompt
 +Actual: reprompt
 #include <​iostream>​ #include <​iostream>​
 #include <​iomanip>​ #include <​iomanip>​
cs-142/cougar-cash-with-input-validation-and-user-confirmation.txt ยท Last modified: 2015/05/12 13:12 by cs142ta
Back to top
CC Attribution-Share Alike 4.0 International
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0