How will you test a calculator? Any thoughts?
thanks,
=== Sorry that I did not elaborate this question much at the beginning. Now, I want to give more backgrounds about this. This question was asked during a technical interview for a programmer position. So I suppose they were looking for some really "smart" answers or some good approach to test such application...
Thanks again.
Check if the calculator is a normal calculator or a scientific calculator. Verify that all the buttons are present and text written on them is readable. Check the arithmetic operations are working fine- +, -, /, * etc. Verify that BODMAS is applied in case of complex queries and the correct result is returned.
To test the calculator, give it the known inputs and check that it computes the known outputs. You then also need to test that each button has the desired effect on the internal stack.
by throwing it against a wall, if it breaks... then it wasn't meant to be.
Besides normal calculations...
Divide by zero.
Make sure negative numbers work
Check if rounding is correct
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With