Suppose i have MainActivity class in which i have two buttons, when B1 is pressed it calls all the methods of Operations_class_1 which this class implements from Interface and same scenario goes for when i pressed B2 but with Operations_class_2
Public interface Myinterface(){
void method1(); void method2() }
Public Operations_class_1 extends Activity implements Interface
{
method1(){
//calculations perform here
}
method2(){
//calculations perform here
}
}
But my question is how to call the these Operations classes methods from MainActivity class buttons
Public class MainActivity extends Activity{
//how to call the methods of those classes by making object of Interface class
}