master
ahmad 2022-10-04 14:17:50 +02:00
parent 0af3f09681
commit 89a15d66db
5 changed files with 35 additions and 4 deletions

11
.classpath 100644
View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5"/>
<classpathentry kind="output" path="bin"/>
</classpath>

1
.gitignore vendored 100644
View File

@ -0,0 +1 @@
/bin/

17
.project 100644
View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Bank</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View File

@ -12,17 +12,17 @@ public class UI {
public UI(Banksystem bs) { public UI(Banksystem bs) {
this.bs = bs; this.bs = bs;
hauptmenü(); hauptmenu();
} }
private void hauptmenü() { private void hauptmenu() {
System.out.println("Willkommen bei der " + bs.getBankname() + "!"); System.out.println("Willkommen bei der " + bs.getBankname() + "!");
mainloop: mainloop:
while (true) { while (true) {
System.out.println(); System.out.println();
System.out.println("--------"); System.out.println("--------");
System.out.println("Hauptmenü"); System.out.println("Hauptmenu");
System.out.println("1 -> Konten anzeigen"); System.out.println("1 -> Konten anzeigen");
System.out.println("2 -> Konto anlegen"); System.out.println("2 -> Konto anlegen");
System.out.println("3 -> Einzahlen"); System.out.println("3 -> Einzahlen");

View File

@ -2,7 +2,9 @@ package de.hs_mannheim.informatik.bank.facade;
import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List;
import de.hs_mannheim.informatik.bank.domain.Bank; import de.hs_mannheim.informatik.bank.domain.Bank;
import de.hs_mannheim.informatik.bank.domain.Konto; import de.hs_mannheim.informatik.bank.domain.Konto;
@ -39,7 +41,7 @@ public class Banksystem {
public long einzahlen(int nummer,long betrag) public long einzahlen(int nummer,long betrag)
{ {
Collection<Konto> konten = bank.getKontenliste(); Collection<Konto> konten = bank.getKontenliste();
long stand = 0;
for(Konto k : konten) for(Konto k : konten)
{ {
if(k.getKontonummer() == nummer) if(k.getKontonummer() == nummer)