Multiple choice technology programming languages

What are the rules to implement an interface? Considering the following declaration for interface Convertable, which of the following code segments will compile?

public interface Convertable {
    int convertToInt();
    char convertToChar();
}

a)

class Digit implements Convertable {
    public char convertToChar() {
        return 0;
    }
    public int convertToInt() {
        return 0;
    }
}

b)

 abstract class Digit implements Convertable {
     int convertToInt();
     char convertToChar();
 }

c)

abstract class Digit implements Convertable {
    public int convertToInt() {
        return 0;
    }
}

d)

abstract class Digit implements Convertable {
    public int convertToInt() {
        return 0;
    }
    char convertToChar();
}

e)

  class Digit implements Convertable {
    int convertToInt() {
        return 0;
        return 0;
    }
}

f)

interface Roundable extends Convertable {
    int roundUp();
}

  1. a, b, c

  2. a, d, e

  3. a, c, f

  4. a, d, f

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Option a) compiles: concrete class implements both methods publicly. Option c) compiles: abstract class can implement some methods and leave others abstract. Option f) compiles: interfaces can extend other interfaces. Options b, d, e fail: b's missing public modifiers, d's incomplete implementation, e's unreachable code and missing method. Answer C is correct.