title: Alternative to overriding with different arguments in java (which is impossible)
body: <p>Hi I am facing a design problem which I think it should be quite common:</p>
  
  <pre><code>public abstract class Parent
  {
      ...
  
     public boolean itsOk()
     {
         return true;
     }
     public void execute()      
     { 
         if (itsOk()){
            System.out.println("done");
         }
     }
  }
  </code></pre>
  
  <p>I need to be able to override itsOK() function in any subclass inherited from 'Parent' even if arguments are different.</p>
  
  <pre><code>public class Example extends Parent
  {
      public boolean itsOK(int a)
      {
         if (a==1)      return true;
         else           return false;
      }
  
  }
  </code></pre>
  
  <p>Then when I call execute, I want the subclass' itsOk() method to be invoked.</p>
  
  <pre><code>public static void main(String[] args) {
      Example e=new Example();
      e.execute();
  }
  </code></pre>
  
  <p>This works ok if the subclass' itsOk() method has no arguments (like the 'Parent's method), so it's an overriding case, but how can I make it when arguments are different?</p>