How would you handle grouping different objects?
For example, lets say you have a book of sport cards and you want to organize and spit out data about that book of sport cards. Obviously each sport card should have its own class and be its own object, but how would you group different sets of sprots cards? What if you wanted to see how many cards (and even the cards themselves) that were made by a given manufacturer in a given year?
Should There be a class card_book that organizes each card with functions like
getTotalBySport($sport) // Gets total number of cards within a given sport
getTotalByPrice($min, $max) // Gets total number of cards within a given price range
getCardsBySport($sport) // Get an array (or whatever other container) of cards within a given sport
or should those functions be implemented directly into the cards class?