FileDocCategorySizeDatePackage
Account.javaAPI DocExample1382Tue Mar 20 16:26:14 GMT 2001None

Account

public class Account extends Object

Fields Summary
private double
the_balance
private double
the_min_balance
Constructors Summary
public Account()

 //minimum balance(overdraft)

                                 // constructor
        
          the_balance = the_min_balance = 0.00; //initialise new account balance
        
Methods Summary
public voiddeposit(double money)

          the_balance = the_balance + money;
         
public doublegetAccountBalance()

          return the_balance;
        
public doublewithdraw(double money)

          if (the_balance - money >= the_min_balance)
            {
              the_balance = the_balance - money;
              return money;
            }
           else
            {
              return 0.00;
            }