According to the Indirection principle of the GRASP approach to object-oriented design, how can you decouple multiple objects to better support reuse?

All QuestionsCategory: Cpp LanguageAccording to the Indirection principle of the GRASP approach to object-oriented design, how can you decouple multiple objects to better support reuse?
Anonymous asked 4 years ago

Options:

  1. Create a child class that can be substituted for a parent class
  2. Create an intermediary class to act as a middleman between objects
  3. Create a superclass that’s of a different type to its subclasses
  4. Create a fake class to handle operations that don’t belong with other objects

1 Answers
Best Answer
Anonymous answered 4 years ago
  1. Create an intermediary class to act as a middleman between objects