This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
If I had a class named "Pickle" and another class, say, "MotherClass", what if I had an ArrayList<Pickle> as an instance variable of the "MotherClass"? Would it be safe to say that MotherClass HAS-A Pickle?
It's a case where it's the instance variable is not directly "Pickle p = new Pickle();" But it's mentioned indirectly, and considering that the ArrayList at instantiation time will not have "Pickles" but they are going to be added later on. I wonder if there is a HAS-A relationship or not.