69 lines
1.2 KiB
Plaintext
69 lines
1.2 KiB
Plaintext
/**
|
|
*
|
|
* Beschreibung
|
|
*
|
|
* @version 1.0 vom 06.05.2025
|
|
* @author
|
|
*/
|
|
|
|
public class Konto {
|
|
|
|
// Anfang Attribute
|
|
private int kontonr;
|
|
private double kontostand;
|
|
private String IBAN;
|
|
private boolean begrenzteÜberweisung;
|
|
// Ende Attribute
|
|
|
|
protected Konto(int kontonr, double kontostand) {
|
|
this.kontonr = kontonr;
|
|
this.kontostand = kontostand;
|
|
}
|
|
|
|
// Anfang Methoden
|
|
public int getKontonr() {
|
|
return kontonr;
|
|
}
|
|
|
|
public void setKontonr(int kontonrNeu) {
|
|
kontonr = kontonrNeu;
|
|
}
|
|
|
|
public double getKontostand() {
|
|
return kontostand;
|
|
}
|
|
|
|
public void setKontostand(double kontostandNeu) {
|
|
kontostand = kontostandNeu;
|
|
}
|
|
|
|
public void einzahlen(double summe) {
|
|
if (summe >= 0) {
|
|
this.kontostand+=summe;
|
|
}
|
|
else {
|
|
System.out.println("Es ist ein Fehler aufgetreten!");
|
|
}
|
|
|
|
}
|
|
public void überweisen(double summe, String IBAN) {
|
|
// TODO hier Quelltext einfügen
|
|
|
|
}
|
|
|
|
public String getIBAN() {
|
|
return IBAN;
|
|
}
|
|
|
|
public boolean getBegrenzteÜberweisung() {
|
|
return begrenzteÜberweisung;
|
|
}
|
|
|
|
public void auszahlen(double summe) {
|
|
// TODO hier Quelltext einfügen
|
|
|
|
}
|
|
|
|
// Ende Methoden
|
|
} // end of Konto
|