nogard oder so

This commit is contained in:
Janis M
2022-04-06 09:04:48 +02:00
parent 840ee3b74b
commit edbd51a7d6
42 changed files with 2029 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package nogard.schritt5;
public class GegenstandNichtVorhandenException extends Exception {
private final String text;
public GegenstandNichtVorhandenException(Gegenstand g) {
StringBuilder sb = new StringBuilder();
sb.append(g.getInfo());
sb.append("Ist nicht in dem Bereich vorhanden.");
text = sb.toString();
}
public GegenstandNichtVorhandenException(String text) {
this.text = text;
}
@Override
public String getMessage() {
return text;
}
}