Sunday, December 27, 2009

Some problems and solution using - TDD

1. ATM Client -
Today I was thinking of writing a sample program which can be used as an ATM client.

Problem - Write a simple java program which act as an ATM client and do following :-
a) User should able to populate their account with some initial amount .. sound funny? latter one we will change this. so that only admin can do that
b) Support for 50, 100 and 500 denomination.
c) Error handling for invalid account, denomination, over flow requested amount.
d) User should able to check account balance.
e) User should able to withdraw valid amount.. in return ATM machine should return the total no of notes for each denomination.

Ok.. enough writing about the problem .. Let us write some code.. code?
or test cases .. I vote for test cases..

What all you need -
1. JDK 5
2. Eclipse
3. Junit 4







No comments: