public interface Usable {
public boolean isUsed();
public void setAsUsed();
public void setAsNotUsed();
}
My question is: The Book class has to implement the Usable interface and join the interface methods with status instance variable either to set the status of the as used or to set the status of the as not used or to return the current value of used instance variable.
I dont really understand how exactly to do what the question is asking.
Well for a start you will need
public class Book implements Usable {
and then because you have done this you will need to implement these methods which hint to the need for a boolean field called used
private boolean used;
public boolean isUsed() {
return used;
}
and hence
public void setAsUsed(used = true);
public void setAsNotUsed(used = false);