1
0
Fork 0
WIZARD_PR2_DOP22/Domain/Karten/Narrenkarte.java

57 lines
989 B
Java
Raw Normal View History

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