From c5ffa957693e2d2f55a9291a255009a6ffb2547d Mon Sep 17 00:00:00 2001 From: Marc Ziegler <2121847@stud.hs-mannheim.de> Date: Tue, 8 Nov 2022 10:13:43 +0100 Subject: [PATCH] =?UTF-8?q?=E2=80=9EBank-Beispiel/src/de/hs=5Fmannheim/inf?= =?UTF-8?q?ormatik/bank/domain/Bank.java=E2=80=9C=20l=C3=B6schen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../informatik/bank/domain/Bank.java | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 Bank-Beispiel/src/de/hs_mannheim/informatik/bank/domain/Bank.java diff --git a/Bank-Beispiel/src/de/hs_mannheim/informatik/bank/domain/Bank.java b/Bank-Beispiel/src/de/hs_mannheim/informatik/bank/domain/Bank.java deleted file mode 100644 index 207a641..0000000 --- a/Bank-Beispiel/src/de/hs_mannheim/informatik/bank/domain/Bank.java +++ /dev/null @@ -1,45 +0,0 @@ -package de.hs_mannheim.informatik.bank.domain; - -import java.io.Serializable; -import java.util.Collection; -import java.util.HashMap; - -public class Bank implements Serializable { - private String name; - private HashMap konten = new HashMap<>(); - private int kontozähler; - - public Bank(String name) { - this.name = name; - this.kontozähler = -1; - } - - public int addKonto(String name, int auswahl) { - Konto k; - - if (auswahl == 1) - k = new Konto(name, ++kontozähler); - else - k = new Girokonto(name, ++kontozähler); - - konten.put(k.getKontonummer(), k); - - return k.getKontonummer(); - } - - public String getName() { - return name; - } - - public Collection getKontenliste() { - return konten.values(); - } - - public Konto findeKonto(int kontonummer) { - return konten.get(kontonummer); - } - public long getSaldo(int Kontonummer) { - return konten.get(Kontonummer).getSaldo(); - } - -}