Path 3: Process(catalog.data, query.data)In the first path, we passed the query to the catalog. In the second path, we passed the catalog to the query. Each of these two ways couples the classes to each other: One must know about the other. A third approach might be to let Interrogator.evaluate() take some information from the catalog and combine it with some information from the query, so that only Interrogator.evaluate() knows both classes.
|