2023-10-05 23:49:36 +02:00
|
|
|
/*
|
|
|
|
============================================================
|
|
|
|
This is the "Zahlenkarte" file from Author: Philipp Kotte
|
|
|
|
written on: 05 / 10 / 2023 at: 23:30
|
|
|
|
============================================================
|
|
|
|
*/
|
|
|
|
package Domain.Karten;
|
|
|
|
|
|
|
|
public class Zahlenkarte extends Karte {
|
|
|
|
|
2023-10-11 17:15:09 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// statische Konstanten
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// statische Attribute(zB. zähler)
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// Attribute jedes Objektes
|
|
|
|
/*------------------------------------------*/
|
2023-10-12 08:51:24 +02:00
|
|
|
private int wert;
|
2023-10-11 17:15:09 +02:00
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// Konstruktoren (default und spezifische)
|
|
|
|
/*------------------------------------------*/
|
2023-10-12 08:51:24 +02:00
|
|
|
public Zahlenkarte() {
|
2023-10-11 17:15:09 +02:00
|
|
|
|
2023-10-12 08:51:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public Zahlenkarte(int wert) {
|
|
|
|
setWert(wert);
|
|
|
|
}
|
2023-10-11 17:15:09 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// statische Methoden
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// Getter und Setter
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
2023-10-12 08:51:24 +02:00
|
|
|
public int getWert() {
|
|
|
|
return this.wert;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setWert(int wert) {
|
|
|
|
this.wert = wert;
|
|
|
|
}
|
|
|
|
|
2023-10-11 17:15:09 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// @Overrides
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
2023-10-12 08:51:24 +02:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
return "Zahlenkarte [Wert: " + getWert() + ", ID: " + this.getId() + " ]";
|
|
|
|
}
|
|
|
|
|
2023-10-11 17:15:09 +02:00
|
|
|
/*------------------------------------------*/
|
|
|
|
// öffentliche Methodes
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
|
|
|
/*------------------------------------------*/
|
|
|
|
// Hilfsmethoden (privat)
|
|
|
|
/*------------------------------------------*/
|
|
|
|
|
2023-10-05 23:49:36 +02:00
|
|
|
}
|