2023-10-05 23:49:36 +02:00
|
|
|
/*
|
|
|
|
============================================================
|
|
|
|
This is the "Narrenkarte" file from Author: Philipp Kotte
|
|
|
|
written on: 05 / 10 / 2023 at: 23:41
|
|
|
|
============================================================
|
|
|
|
*/
|
|
|
|
package Domain.Karten;
|
|
|
|
|
2023-10-10 16:46:11 +02:00
|
|
|
import Domain.Enums.Kartenfarbe;
|
|
|
|
|
2023-10-05 23:49:36 +02:00
|
|
|
public class Narrenkarte extends Karte {
|
|
|
|
|
2023-10-10 16:46:11 +02:00
|
|
|
// Statische Konstanten
|
2023-10-26 13:50:54 +02:00
|
|
|
private final static String NAME = "Narr";
|
2023-10-10 16:46:11 +02:00
|
|
|
// Statische Attribute
|
2023-10-13 07:58:37 +02:00
|
|
|
|
2023-10-10 16:46:11 +02:00
|
|
|
// Attribute des Objekts
|
2023-10-26 13:50:54 +02:00
|
|
|
|
|
|
|
private String name;
|
2023-10-10 16:46:11 +02:00
|
|
|
// Konstruktoren
|
2023-10-12 08:51:24 +02:00
|
|
|
|
|
|
|
public Narrenkarte(int id) {
|
|
|
|
super(id);
|
2023-10-26 13:50:54 +02:00
|
|
|
setName();
|
2023-10-13 07:58:37 +02:00
|
|
|
|
2023-10-10 16:46:11 +02:00
|
|
|
}
|
|
|
|
// Statische Methoden
|
2023-10-12 08:51:24 +02:00
|
|
|
|
2023-10-10 16:46:11 +02:00
|
|
|
// Getter und Setter
|
2023-10-26 13:50:54 +02:00
|
|
|
|
2023-10-10 16:46:11 +02:00
|
|
|
public int getId() {
|
2023-10-26 13:50:54 +02:00
|
|
|
return super.getId();
|
2023-10-10 16:46:11 +02:00
|
|
|
}
|
2023-10-12 08:51:24 +02:00
|
|
|
|
2023-10-26 13:50:54 +02:00
|
|
|
private void setName() {
|
|
|
|
this.name = NAME;
|
2023-10-10 16:46:11 +02:00
|
|
|
}
|
2023-10-12 08:51:24 +02:00
|
|
|
|
2023-10-26 13:50:54 +02:00
|
|
|
public String getName() {
|
|
|
|
return this.name;
|
2023-10-10 16:46:11 +02:00
|
|
|
}
|
2023-10-12 08:52:37 +02:00
|
|
|
|
2023-10-11 18:44:58 +02:00
|
|
|
public void setNarrenkarteanzahl(int narrenkarteanzahl) {
|
|
|
|
narrenkarteanzahl++;
|
|
|
|
}
|
2023-10-12 08:51:24 +02:00
|
|
|
|
2023-10-10 16:46:11 +02:00
|
|
|
// @Overrides
|
2023-10-12 08:51:24 +02:00
|
|
|
@Override
|
|
|
|
public String toString() {
|
2023-10-26 13:50:54 +02:00
|
|
|
return "ID " + this.getId() + ": " + this.getName();
|
2023-10-12 08:51:24 +02:00
|
|
|
}
|
2023-10-10 16:46:11 +02:00
|
|
|
// Public Methoden
|
2023-10-12 08:51:24 +02:00
|
|
|
|
2023-10-10 16:46:11 +02:00
|
|
|
// Private Methoden
|
2023-10-12 08:51:24 +02:00
|
|
|
|
2023-10-05 23:49:36 +02:00
|
|
|
}
|