I am wondering how to implement an abstract method in an interface. Given this interface:
To implement the abstract method, do I just declare the method as abstract?
or declare the interface as abstract?
Or are other things needed?
I have a class that implements the interface called `Marks`:
So, my main problem is How to implement the abstract method in interface?
Code:
public interface Analysis
{
public double getAverage();
}
To implement the abstract method, do I just declare the method as abstract?
Code:
public abstract double getAverage(); ??
Code:
public abstract interface Analysis
{
public double getAverage();
}
Or are other things needed?
I have a class that implements the interface called `Marks`:
Code:
public class Marks implements Analyzable
{ some other code
constructor
mutators
accessor
public double getAverage();
}
So, my main problem is How to implement the abstract method in interface?