Suppose you have a list of objects, and you need to filter it according to some criteria which are only known at runtime. In addition to filters based on the objects properties, you also need to filter objects based on arbitrary logical combinations (AND, OR and NOT) of such property-based criteria.
For example, suppose you have a list of Person objects, and you wish to filter the list based on arbitrary combinations of each person’s name, date of birth, address, sex, etc.
Implement a set of classes which would solve this problem.