Currently I have two different (A,B) classes which basically share common logic but also one of them (let’s say class A) have special additional logic. Class A pretty much contains B’s logic. I want to unite them into one base class.I thought about doing one base class which will contain all the logic, and have two sub classes which will define a flag whether or not should we execute the special logic I mentioned and then I can check this in the base class. I guess I can also have a base class containing B’s logic (the more specific one) and then extend it to another sub class which will implement the special logic. Wanted to hear pros and cons or any other ideas that might come up. Thanks !