Write an interface, PointingDevice, containing: an abstract method, getXCoord that returns an int an abstract method, getYCoord that returns an int an abstract method, attentionRequired that returns a boolean an abstract method, setResolution that accepts a double and returns a double

LANGUAGE: JAVA

CHALLENGE:

Write an interface, PointingDevice, containing:
an abstract method, getXCoord that returns an int
an abstract method, getYCoord that returns an int
an abstract method, attentionRequired that returns a boolean
an abstract method, setResolution that accepts a double and returns a double

SOLUTION:


interface PointingDevice{
   int getXCoord();
   int getYCoord();
   boolean attentionRequired();
   double setResolution(double a);
}

abstract class TestPointingDevice implements PointingDevice{
   public int getXCoord(int x){
      return x;
   }
   
   public int getYCoord(int y){
      return y;
   }

   public boolean attentionRequired(boolean a){
      return a;
   }

   public double setResolution(double a){
      return a;
   }
}