Purchase Solution

Sample code for the ATM machine

Not what you're looking for?

Ask Custom Question

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.

Attachments
Purchase this Solution

Solution Summary

Write the ATM machine

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Basic Networking Questions

This quiz consists of some basic networking questions.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.