/* ============================================================ 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 { /*------------------------------------------*/ // statische Konstanten /*------------------------------------------*/ /*------------------------------------------*/ // statische Attribute(zB. zähler) /*------------------------------------------*/ /*------------------------------------------*/ // Attribute jedes Objektes /*------------------------------------------*/ private int wert; /*------------------------------------------*/ // Konstruktoren (default und spezifische) /*------------------------------------------*/ public Zahlenkarte() { } public Zahlenkarte(int wert) { setWert(wert); } /*------------------------------------------*/ // statische Methoden /*------------------------------------------*/ /*------------------------------------------*/ // Getter und Setter /*------------------------------------------*/ public int getWert() { return this.wert; } public void setWert(int wert) { this.wert = wert; } /*------------------------------------------*/ // @Overrides /*------------------------------------------*/ @Override public String toString() { return "Zahlenkarte [Wert: " + getWert() + ", ID: " + this.getId() + " ]"; } /*------------------------------------------*/ // öffentliche Methodes /*------------------------------------------*/ /*------------------------------------------*/ // Hilfsmethoden (privat) /*------------------------------------------*/ }