How to add same method to multiple classes (activity)
<p>I have 3 classes A, B, and C. These extend another class D.</p>

<p>Class D has a method that is used in all classes A, B, and C. </p>

<p>Now the problem is that classes A, B, and C should extend different classes and use just the same method from class D.</p>

<p>I can't believe that I should copy and paste the method in all my classes. Is there something like an include for function in C?</p>

<p>By the way I'm working on an Android app. Class D extends Activity and has a method for managing a common menu of Android activities A, B, and C (this is the official approach as reported in Android's documentation). However I need that these activities extend different classes such as ActivityList and not just the Activity class.</p>
