Problem
Design a Kindle device that manages a library and renders books from multiple file formats without format-specific code
- Keep the device code free of format-specific branches when rendering books
- Decouple book data from rendering logic to prevent binding formats to the book entity
- Isolate renderer selection in a factory so adding a new format requires minimal changes
Key Test Points
- Abstract Reader interface
- Simple ReaderFactory
- Pure data Book entity
Spot an issue or have a suggestion?