Try the same model with your own values. No checks, nothing recorded.
Back to Interfaces and polymorphism in design
The payment interface, three payments and the checkout from this tutorial. Add a class of your own that keeps the promise (a gift card, cash, a payment with a flat fee), put it in the list, and run it: the checkout does not change. Or remove a method from one class and watch when Python complains. Reset brings the starter back.
Python runs here. Java is shown for reading; paste it into a Java tool on your computer to run it.