Object-Oriented Programming · Amazon · Medium
Design a search library that walks a tree of folders and can be extended with new matching rules over time. Every folder may hold documents as well as nested subfolders, and every document carries three attributes: a name, a size measured in bytes, and a type. The first requirement is to locate every document whose size is strictly larger than a given threshold. The design must then grow to cover: Filtering documents by their type; Combining conditions with logical AND, for…