Not sure why my method in the interface is not being overridden.
I get an error message that the class calling the method is not abstract and does not override the method.
Here is the code:
public class Prioritization extends Task {
public void main(String[] args) {
setPriority();
}
}
interface Priority {
public void setPriority();
public void getPriority();
final int low = 1;
final int medium = 50;
final int high = 100;
}
public class Task implements Priority {
private int takeOutgarbage;
private int drinkBeer;
private int doHomework;
private String message;
public void setPriority(){
takeOutgarbage = 1;
drinkBeer = 100;
doHomework = 50;
}
}
This produces the following error:
Task is not abstract and does not override abstract method getPriority() in Priority public class Task implements Priority {