0

Problem: Suppose I have a class (call it cA), which has a reference to a helper class (call it HelperBase). The Helper class can be extended for specific implementations (call those HelperA, HelperB, etc.). However, I don't want cA to have any knowledge of the specific implementations either HelperA, HelperB, etc; I just want cA to call whatever methods are in Helper. Is there a way to do that? Is there a term for this? I'm also not sure what the terminology is for this kind of design (if there is one).

Examples in objective-c would be greatly appreciated. Thanks!

OfLettersAndNumbers
  • 822
  • 1
  • 12
  • 22
  • [Inheritance](http://www.tutorialspoint.com/objective_c/objective_c_inheritance.htm) and [polymorphism](http://www.tutorialspoint.com/objective_c/objective_c_polymorphism.htm) should get you started. – GolezTrol Dec 04 '15 at 18:09
  • I think that should get you the information you need. See also [Protocol vs class cluster](http://stackoverflow.com/q/5312438) and [ObjC: how can I create an interface class?](http://stackoverflow.com/q/3579938) – jscs Dec 04 '15 at 19:44

0 Answers0