{
System.out.println(accountName);
System.out.print("\t>> ");
String name = stdin.readLine().trim();
Konto konto = bank.finde(name);
if(konto == null)
System.out.println(noSuchAccount);
else
System.out.println(konto.kontostand());
}
else if(command.equals("withdraw"))
{
System.out.println(accountName);
System.out.print("\t>> ");
String name = stdin.readLine().trim();
System.out.println(enterAmount);
System.out.print("\t>> ");
String amount = stdin.readLine().trim();
try
{
Konto konto = bank.finde(name);
if(konto == null)
System.out.println(noSuchAccount);
else
{
long amount2 = Long.parseLong(amount);
konto.abheben(amount2);
}
}
catch(NumberFormatException e)
{
System.out.println(wrongNumberFormat);
} catch (BankException e) {
System.out.println(overdrawAccount);
}
}
else if(command.equals("deposit"))
{
System.out.println(accountName);
System.out.print("\t>> ");
String name = stdin.readLine().trim();
System.out.println(enterAmount);
System.out.print("\t>> ");
String amount = stdin.readLine().trim();
try
{
Konto konto = bank.finde(name);
if(konto == null)
System.out.println(noSuchAccount);
else
{
long amount2 = Long.parseLong(amount);
konto.einzahlen(amount2);
}
}
catch(NumberFormatException e)
{
System.out.println(wrongNumberFormat);
}
}
else if(command.equals("pay interest"))
{
bank.verzinsen();
}
else if(command.equals("delete"))
{
System.out.println(accountName);
System.out.print("\t>> ");
String name = stdin.readLine().trim();
Konto konto = bank.finde(name);
if(konto == null)
System.out.println(noSuchAccount);
else
{
bank.loesche(name);