M4 practical task: Collections, Files, and Streams.
Vladlen Medvedev
- CsvImportService: reads intake.csv, validates rows, skips invalid ones with SLF4J warnings
- Blank age treated as unknown, non-numeric age and bad dates rejected
- ShelterAnalyticsService: all required collections built
- List allAnimals
- Set uniqueSpecies (alphabetically sorted)
- Map<String, List> animalsBySpecies
- List animalsNeedingVetInput (animals with unknown age)
- Stream-based metrics: vaccinated/unvaccinated counts per species, oldest animal per species (unknown ages excluded)
- ReportExportService: writes output/upload-report.txt with totals, per-species breakdown, oldest animals, and needs-vet-input list
Stretch goals skipped:
- Optional for missing age
- JSON export
- Multiple CSV files via Files.walk()
- Timestamped report filenames
- Processed-files registry
- Invalid row numbers in report
Have a great day!!