Class KontoA

java.lang.Object
  extended by KontoA
All Implemented Interfaces:
Konto

public class KontoA
extends java.lang.Object
implements Konto

Konto version A. Uses synchronized methods to display, add and remove money from the account.

Author:
Heinz Kredel.

Field Summary
private  double stand
           
 
Constructor Summary
KontoA()
           
KontoA(double a)
           
 
Method Summary
 double getGeld(double b)
          getGeld.
 double putGeld(double b)
          putGeld.
 double zeigeGeld()
          Displays account balance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stand

private double stand
Constructor Detail

KontoA

public KontoA()

KontoA

public KontoA(double a)
Method Detail

zeigeGeld

public double zeigeGeld()
Displays account balance.

Specified by:
zeigeGeld in interface Konto
Returns:
stand.

putGeld

public double putGeld(double b)
Description copied from interface: Konto
putGeld.

Specified by:
putGeld in interface Konto
Parameters:
b - adds desired value to current account.
Returns:
s after booking (a call to "WorkA" is done, where current thread sleeps for a random time). current account balance is given back.

getGeld

public double getGeld(double b)
Description copied from interface: Konto
getGeld.

Specified by:
getGeld in interface Konto
Parameters:
b - draws desired value from the account.
Returns:
s gives back current account balance.