Dave

Dave

  • NA
  • 1
  • 0

object array or collection

Mar 18 2010 10:41 PM

Basic array/ collections question.
Say I want my users to be able to store multiple movie lists with their account. So the user might create and save a "Bob's Comedies" list and a "Bob's Classics" list etc. that he's built from a master list of movies.
So I've got a MoviesList class, of which there will be multiple instances per user, and the movielist class will contain one or more movie class objects.
 
At some point, the user will want to view his movielist with all his movies and their metadata.
When this is instantiated, how do I associate the movies with the list? Do I have a collection of movies within the movielist class? Or do I have an array of movies within the movielist class? Or does my movielist class contain nothing more than an array of indexes to the movies?
 

Answers (2)