2

I have a question which has been explained in many ways , but still has not made me clear.

  1. What is creating of objects by "Object composition" in terms of abstract factory pattern ?

It seems like both the patterns use inheritance to create objects.

Dave Schweisguth
  • 36,475
  • 10
  • 98
  • 121
Chandan
  • 1,486
  • 2
  • 15
  • 24

1 Answers1

0

Object composition means the object is composed of something. It's basically the strategy pattern, making the two objects have a "has-a" relationship, rather than an "is-a" relationship (as with straight inheritance).

y2k
  • 65,388
  • 27
  • 61
  • 86
  • I know that each object in the family of related objects created as part of abstract factory can be created by a factory method. But I did not understand why strategy pattern comes into picture. – Chandan Jun 03 '13 at 04:24