Design(How-to) of classes containing collections of other classes
How to design classes involving collections of other classes? General Example: A Workspace contains number of Projects . A Project contains large number of Resources . Each Resource may contain large number of Files . So here the classes identified can be Workspace,Project,Resource and File. Workspace will have list of Project.Project will have list of Resources and Resource will have list of Files. Of course each class has its related settings. Now the basic questions are : a) Who creates and adds a class to a particular collection? Another class or the class containing the collection? b)