ATM in Java for class