 <p>Does it have to be interface? Maybe abstract class will be better.</p> <pre><code>public abstract class Square { public int getSize() { return getWidth() * getHeight(); } //no body in abstract methods public abstract int getHeight(); public abstract int getWidth(); } public class Square1 extends Square { public int getHeight() { return 1; } public int getWidth() { return 1; } } </code></pre>