WIZARD_PR2_DOP/Domain/Karten/Magierkarte.java

56 lines
911 B
Java
Raw Normal View History

/*
============================================================
This is the "Magierkarte" file from Author: Philipp Kotte
written on: 05 / 10 / 2023 at: 23:41
============================================================
*/
package Domain.Karten;
import Domain.Enums.Kartenfarbe;
public class Magierkarte extends Karte {
// Statische Konstanten
2023-10-26 13:50:54 +02:00
private final static String NAME = "Zauberer";
// 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 Magierkarte(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
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;
}
// @Overrides
@Override
public String toString() {
2023-10-26 13:50:54 +02:00
return "ID " + this.getId() + ": " + this.getName();
}
// Public Methoden
// Private Methoden
}