public static void perform(Itaxtogov ob) { ob.paytax(50000); }
//Q5. Create a interface Itaxtogov with method void paytax(double amt). // Create a class myindia, myeurope let this class implement this interface. // In class myindia paytax method will print tax amount which is 40% of the data passed in method. // In class myeurope paytax method will print tax amount which is 30% of the data passed in method. public static void calculateTax(Itaxtogov interfaceref, double amt) { interfaceref.paytax(amt); }