Class Account

Class Account

java.lang.Object
   |
   +----Account

public class Account
extends Object
Superclass of bank account hierarchy.

Variable Index

 o acct_no
The account number.
 o ss
The social security number of owner.

Constructor Index

 o Account()
 o Account(int, double, String)
Constructor.

Method Index

 o balance()
Retrieves the account balance.
 o deposit(double)
Deposits into account.
 o withdraw(double)
Withdraw from account.

Variables

 o acct_no
  protected int acct_no
The account nubmer.
 o ss
  protected String ss
The social security number of owner.

Constructors

 o Account
  public Account()
 o Account
  public Account(int id,
                 double amt,
                 String ss)
Constructor. Initializes a new account.
Parameters:
amt - Initial balance amount
ss - Social security number as string

Methods

 o balance
  public double balance()
Retrieves the account balance.
Returns:
the balance
 o deposit
  public void deposit(double amt)
Deposits into account.
Parameters:
amt - the amount to deposit, if amt <=0 no effect
 o withdraw
  public boolean withdraw(double amt)
Withdraw from account.
Parameters:
amt - the amount to deposit
Returns:
false if amt <=0 or insufficient balance