Suppose you have a list of Dog and Cat objects from previous lab and want to find the average,
minimum, and maximum weight of dogs. To compute these values, you must scan the whole list. It
would be more efficient if you could get the results by traversing only Dog objects in the list. One
approach to achieve this improvement is to create another list that includes only Dog objects
(actually references to Dog objects). Here’s an example: