Explore BrainMass

Explore BrainMass

    Sample code for the ATM machine

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Read the article: Test Infected: Programmers Love Writing Tests at http://junit.sourceforge.net/doc/testinfected/testing.htm. Now assume that one has to design an ATM machine object using Java (C or C++) with the following functionalities: check balance, deposit cash, and withdraw cash. Our project is to design a JUnit (CUnit or CppUnit) test framework. If you are good at C, C++, or Java, you can write the ATM machine itself and Unit test in real source code. However, if you are not good at programming, you can use pseudo-code to write the ATM machine and then design the test cases (that should be similar to the test cases in the above article). After you finish the real code or pseudo-code, you need to discuss the coverage analysis. That is, will your test case be sufficient to cover all possible cases? In another word, if the program passes your Unit test, will that guarantee that the code is faulty-free?

    Sample code for the ATM machine is attached. You can use this code for the project. If you use this code, then you only need to design the test case for it.

    © BrainMass Inc. brainmass.com December 24, 2021, 6:54 pm ad1c9bdddf


    Solution Summary

    Write the ATM machine