From 89a15d66db365fd2fcc0611bd566069444c58665 Mon Sep 17 00:00:00 2001 From: ahmad Date: Tue, 4 Oct 2022 14:17:50 +0200 Subject: [PATCH] pushed --- .classpath | 11 +++++++++++ .gitignore | 1 + .project | 17 +++++++++++++++++ src/de/hs_mannheim/informatik/bank/UI/UI.java | 6 +++--- .../informatik/bank/facade/Banksystem.java | 4 +++- 5 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 .classpath create mode 100644 .gitignore create mode 100644 .project diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..80da0c7 --- /dev/null +++ b/.classpath @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ae3c172 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/.project b/.project new file mode 100644 index 0000000..8c75808 --- /dev/null +++ b/.project @@ -0,0 +1,17 @@ + + + Bank + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/src/de/hs_mannheim/informatik/bank/UI/UI.java b/src/de/hs_mannheim/informatik/bank/UI/UI.java index f78a622..227d8c5 100644 --- a/src/de/hs_mannheim/informatik/bank/UI/UI.java +++ b/src/de/hs_mannheim/informatik/bank/UI/UI.java @@ -12,17 +12,17 @@ public class UI { public UI(Banksystem bs) { this.bs = bs; - hauptmenü(); + hauptmenu(); } - private void hauptmenü() { + private void hauptmenu() { System.out.println("Willkommen bei der " + bs.getBankname() + "!"); mainloop: while (true) { System.out.println(); System.out.println("--------"); - System.out.println("Hauptmenü"); + System.out.println("Hauptmenu"); System.out.println("1 -> Konten anzeigen"); System.out.println("2 -> Konto anlegen"); System.out.println("3 -> Einzahlen"); diff --git a/src/de/hs_mannheim/informatik/bank/facade/Banksystem.java b/src/de/hs_mannheim/informatik/bank/facade/Banksystem.java index 31bb9fa..614b289 100644 --- a/src/de/hs_mannheim/informatik/bank/facade/Banksystem.java +++ b/src/de/hs_mannheim/informatik/bank/facade/Banksystem.java @@ -2,7 +2,9 @@ package de.hs_mannheim.informatik.bank.facade; +import java.util.ArrayList; import java.util.Collection; +import java.util.List; import de.hs_mannheim.informatik.bank.domain.Bank; import de.hs_mannheim.informatik.bank.domain.Konto; @@ -39,7 +41,7 @@ public class Banksystem { public long einzahlen(int nummer,long betrag) { Collection konten = bank.getKontenliste(); - long stand = 0; + for(Konto k : konten) { if(k.getKontonummer() == nummer)