java.lang.ObjectAccount
public class Account
Account class holds the identifier, name and current balance
Constructor Summary | |
---|---|
Account(int num,
java.lang.String str)
Constructor for objects of class Account |
Method Summary | |
---|---|
java.lang.String |
getAccountName()
Accessor method for account name |
int |
getAccountNumber()
Accessor method for account number |
float |
getBalance()
Accessor method for balance |
void |
report()
Print account number, name and current balance |
float |
updateBalance(float amt)
Add the transaction amount to the balance |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Account(int num, java.lang.String str)
num
- the account numberstr
- the account nameMethod Detail |
---|
public java.lang.String getAccountName()
public int getAccountNumber()
public float getBalance()
public void report()
public float updateBalance(float amt)
amt
- the transaction amount