Write an interface named ‘Test’ with the following behavior: a method ‘getDuration’ that returns a ‘Duration’ object. a method ‘check’ that accepts an integer parameter and returns a ‘Result’ object. a method ‘getScore’ that returns a double.

Write an interface named ‘Test’ with the following behavior: a method ‘getDuration’ that returns a ‘Duration’ object. a method ‘check’ that accepts an integer parameter and returns a ‘Result’ object. a method ‘getScore’ that returns a double.

LANGUAGE: JAVA

CHALLENGE:

Write an interface named ‘Test’ with the following behavior:
a method ‘getDuration’ that returns a ‘Duration’ object.
a method ‘check’ that accepts an integer parameter and returns a ‘Result’ object.
a method ‘getScore’ that returns a double.

SOLUTION:


public interface Test{ 
   public abstract Duration getDuration();
   public abstract Result check(int arg0);
   public abstract double getScore();
}

Add comment