0

Say I have three classes: User, Address and OrderProduct.

User has fields such as name, phone number and address where address is an instance of Address.

If OrderProduct, a class which handles ordering of products, needs the address stored in User, would I just list User as a collaborator or would I need to include the Address class as a collaborator because User class contains that?

sam
  • 2,469
  • 8
  • 37
  • 57

1 Answers1

0

Just the user, because it needs it to get the address. The address itself is just data.

vainolo
  • 6,907
  • 4
  • 24
  • 47