Class Account
Class Account
java.lang.Object
|
+----Account
- public class Account
- extends Object
Superclass of bank account hierarchy.
-
acct_no
- The account number.
-
ss
- The social security number of owner.
-
Account()
-
-
Account(int, double, String)
-
Constructor.
-
balance()
- Retrieves the account balance.
-
deposit(double)
- Deposits into account.
-
withdraw(double)
-
Withdraw from account.
acct_no
protected int acct_no
- The account nubmer.
ss
protected String ss
- The social security number of owner.
Account
public Account()
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
balance
public double balance()
- Retrieves the account balance.
- Returns:
- the balance
deposit
public void deposit(double amt)
- Deposits into account.
- Parameters:
- amt - the amount to deposit, if amt <=0 no effect
withdraw
public boolean withdraw(double amt)
- Withdraw from account.
- Parameters:
- amt - the amount to deposit
- Returns:
- false if amt <=0
or insufficient balance