Class Account

java.lang.Object
  extended by Account

public class Account
extends java.lang.Object

Account class holds the identifier, name and current balance

Version:
28/07/2011
Author:
Claude Sammut

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

Account

public Account(int num,
               java.lang.String str)
Constructor for objects of class Account

Parameters:
num - the account number
str - the account name
Method Detail

getAccountName

public java.lang.String getAccountName()
Accessor method for account name


getAccountNumber

public int getAccountNumber()
Accessor method for account number


getBalance

public float getBalance()
Accessor method for balance


report

public void report()
Print account number, name and current balance


updateBalance

public float updateBalance(float amt)
Add the transaction amount to the balance

Parameters:
amt - the transaction amount