se.kth.leiflindback.distdb.db
Class InterestCommand

java.lang.Object
  extended by se.kth.leiflindback.distdb.db.InterestCommand
All Implemented Interfaces:
java.io.Serializable, Command

public class InterestCommand
extends java.lang.Object
implements Command

This Command implementation is used to deposit interest.

See Also:
Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
InterestCommand(float percentage)
          Constructs an instance that will deposit the gained interest to all accounts it is sent to.
 
Method Summary
 void execute(Account account)
          Executes the task of the command implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

InterestCommand

public InterestCommand(float percentage)
Constructs an instance that will deposit the gained interest to all accounts it is sent to.

Parameters:
percentage - The interest percentage. If the interest is 3% the call should be new DepositCommand(3).
Method Detail

execute

public void execute(Account account)
Description copied from interface: Command
Executes the task of the command implementation.

Specified by:
execute in interface Command
Parameters:
account - The account on wiich to invoke the command,