Archive for May 12th, 2013

Java Program 9 – Bank Management

Program

import java.io.*;

class InvalidDeposit extends Exception {

}

class InvalidWithdrawal extends Exception {

}

class InvalidRate extends Exception {

}

class Bank {

    double balance=0;
    InputStreamReader r=new InputStreamReader(System.in);
    BufferedReader br=new BufferedReader(r);
    
    public void deposit(double deposit) {
    
        balance+=deposit;
        System.out.println("\n****** " + deposit + " creadited into your account. Available balance : " + balance + " ******\n");
    
    }
    

Read more »

Last updated by at .