informatikperson 2022-10-25 12:23:56 +02:00
parent 6352a15c65
commit 834487d0cd
4 changed files with 7 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import de.hs_mannheim.informatik.bank.ui.UI;
public class Main {
public static void main(String[] args) {
public static void main(String[] args) throws Exception {
Banksystem bs = new Banksystem("Sparkasse Mannheim");
UI ui = new UI(bs);
System.out.println("Main Main!");

View File

@ -1,8 +1,9 @@
package de.hs_mannheim.informatik.bank.domain;
import java.io.Serializable;
import java.util.Date;
public class Kontoauszüge {
public class Kontoauszüge implements Serializable {
private long kontostand;
private long betrag;

View File

@ -11,7 +11,10 @@ import infrastruktur.Persistenz;
public class Banksystem {
private Bank bank;
public Banksystem(String bankname) {
public Banksystem(String bankname) throws Exception {
if (Persistenz.sindDatenGespeichert(bankname))
this.bank = (Bank) Persistenz.ladeBankDaten(bankname);
else
this.bank = new Bank(bankname);
}