edu.pdx.cs399J.net
Class SynchronizedBankAccount

java.lang.Object
  extended by edu.pdx.cs399J.net.BankAccount
      extended by edu.pdx.cs399J.net.SynchronizedBankAccount

public class SynchronizedBankAccount
extends BankAccount

Synchronized methods ensure that the data in the balance is accessed correctly.


Constructor Summary
SynchronizedBankAccount()
           
 
Method Summary
 void doTransaction(int trans)
           
 int getBalance()
           
 void setBalance(int balance)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SynchronizedBankAccount

public SynchronizedBankAccount()
Method Detail

getBalance

public int getBalance()
Overrides:
getBalance in class BankAccount

setBalance

public void setBalance(int balance)
Overrides:
setBalance in class BankAccount

doTransaction

public void doTransaction(int trans)


Copyright © 2000-2009 Portland State University. All Rights Reserved.