Answer:
The code to this question can be given as:
Code:
public interface Test
{
public abstract Duration getDuration();
public abstract Result check(int ar);
public abstract double getScore();
}
Step-by-step explanation:
An interface is similar to Java Class, and it has only static variables and abstract methods. Java uses a multi-inheritance interface. Many Java interfaces can be implemented by a Java class. All methodologies were implicitly public and abstract within an interface.
In the given question we a function that is "Test" and inside the interface, we define three functions that are defined as:
- First, we declare a "getDuration" method that returns the Duration object.
- Second, we declare a "check" method that accepts an integer variable that is "a".
- Third, we declare a "getScore" method that returns a double value.