The Coffee Shop Kata exercise is designed to provide a hands-on experience in learning and demonstrating the usage of latest Java features while comparing them with older.
The domain for the kata is a Coffee Shop. There are several domain
classes that are shared by all the exercises. These are
Items,
CoffeeShopOrder,
Beverage,
Tea,
CoffeeDrink,
Latte,
Macchiato,
Americano,
BakeryItem,
Cookie,
Bagel, and
Donut.
The following Java concepts will be useful in completing the kata:
- Records
- Record patterns
- Pattern matching for switch
- Sealed classes
This kata involves refactoring existing code and implementing missing code! All the code you need to complete is in
the
jdk21module, with the corresponding solutions incoffee-shop-kata-solutions. The purpose of thejdk8module is to show you the Java 8 way of solving these problems; there are no TODOs in this module. For technical setup, follow the instructions inSETUP.md!
- Run the Tests in CoffeeShopTest
- Fix the Code Using "TODO" and "HINT" Comments
- Repeat step 1 and 2 until all tests pass
