3 ms·
Would love to see the source code for this situation, where payment is disrupted due to the change jar needing to emptied. I bet the programmers put in some am
by bitcartel 14y ago
Would love to see the source code for this situation, where payment is disrupted due to the change jar needing to emptied. I bet the programmers put in some amusing comments.
- rehack 14y agoIs there a way this scenario can be coded in any other way than: --- while(moneyGotSoFar < targetMoneyToget) { // code to interface with hardware device which // is taking in money // NOTE: moneyGotInThisBurst would be told by the // hardware device software ... // some time out code. And exception handling if // no cash entered moneyGotSoFar += moneyGotInThisBurst; } --- So point is, the developers may not think upfront of these kind of cases. And this case can be a boundary condition test case - May potentially test any array overflows. Or some looping done the wrong way. Or out of memory if it has been coded in Java(Oops. Sorry :-))