Raju Champaklal wrote:we know that two classes have a Has a relationship if one class has a instance variable that refers to the other class...but if one class has an arraylist that contains the objects of the other class...then will be considered Has a relationship?
First of all you have a has- a relationship with ArrayList. When you will iterate over list and will assign those objects to instance variable of that type.
Your relationship with all the objects containing in that list is has-a relationship.
Please correct me...