added uebung07 angabe

This commit is contained in:
2025-05-23 20:54:12 +02:00
parent 6efe637f23
commit 8942229d87
19 changed files with 733 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
package oop.ch05.mensa;
public class CountCard extends MensaCard {
public CountCard(String key, Color color) {
super(key, color);
if (color != Color.red && color != Color.gray)
throw new IllegalArgumentException("Invalid CountCard color " + color);
}
@Override
public void pass(CashPoint cashPoint) {
cashPoint.count(this);
}
}