I've experienced this business behavior many times in the past, and this time decided to post a question here since I'm very curious how other people implemented it.
I have four processes in my system. Each process represented as a class (in C# environment), composed of shared functionality and functionality that exclusively used by this process.
Here's a class hierarchy of my system:
BASE / \ A B / \ / \ Ax Ay Bx By
BASE, A and B are abstract classes, which contain abstract methods as well as actual implementations.
Ax, Ay, Bx and By are the classes that represent processes. Each class has its unique methods, as well as methods shared with other processes. For example, Ax has its own methods, and it shares methods with Ay and Bx. There're additional functions that shared by all the classes, and they implemented in BASE.
To be precise:
Ax class shares the same methods (actual implementations) with Ay via A class. So Bx shares its methods with By via B class.
In addition to that, Ax shares another portion of methods with Bx. In the same way, Ay shares same methods with By. This sharing done via the BASE class. The problem is that each of the classes are exposed to functionality that they shouldn't be aware of. For example, Ax shouldn't be aware of methods shared between Ay and By..
How could I design a better implementation of my system? Are there any design patterns which intended to ease this setup?