This GitHub Classroom kata mirrors real-world work with messy CSV data. You’ll load contacts, validate rows using a custom exception, and query with Java Streams.
./gradlew testOr compile & run a main if you add one:
javac src/main/java/com/example/addressbook/AddressBook.java
java com.example.addressbook.AddressBook- Load valid contacts from
contacts.csv. - Throw a custom exception for malformed rows and log errors without crashing.
- Search by name (partial, case-insensitive).
- Filter by city (case-insensitive).
- Filter by phone prefix.
- Return unique cities (
Set<String>). - Sort contacts by name (case-insensitive).
- Group & count contacts by city (
Map<String, Long>).
Templates are intentionally minimal so you write most of the code. Read each test to see expected behaviour and method signatures.