001
002 import java.io.*;
003
004 /**
005 * Represents a transactions from "KontoS[a]" to "KontoS[b]" using
006 * double "betrag" as amount and an array from KontoS as accounts.
007 * Will be deprecated, use Ueberweisung with Konto interface.
008 * @author Heinz Kredel.
009 */
010
011 public class UeberweisungS implements Serializable {
012
013 int a;
014 int b;
015 double betrag;
016
017
018 /**
019 * @param A An index to KontoS[].
020 * @param B An index to KontoS[].
021 * @param be a double, amount to transfer from account A to account B.
022 */
023 public UeberweisungS(int A, int B, double be) {
024 a = A; b = B; betrag = be;
025 }
026
027
028 /**
029 * Calls the methods "getGeld() and "putGeld()" to perform
030 * the acounting transaction.
031 * @param konten "KontoS" Array, represents accounts.
032 */
033 public void run(KontoS[] konten) {
034 double x = konten[a].getGeld(betrag);
035 double y = konten[b].putGeld(betrag);
036 }
037
038
039 }