This was an interview question and I doubt if it's a trap. The question is

There is a Class A with a few method. Now how would you implement this using OOPs
if I want to share only a few methods of A exclusively with another Class B. And share a few other methods of A, exclusively with another Class C. And so on.

Is it really possible to implement this.

Note: Please assume and state whatever condition is required to implement this.

Related posts

Recent Viewed