realisation of ATM.java methods.