nerdexam
Salesforce

CRT-450 · Question #136

A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces. public interface Sortable { void sort(); } public interface Drawable { void…

The correct answer is C. Public class DrawList implements Sortable, Drawable { public void sort() { /*implementation*/}. See the full explanation below for the reasoning.

Question

A developer must create a DrawList class that provides capabilities defined in the Sortable and Drawable interfaces. public interface Sortable { void sort(); } public interface Drawable { void draw(); } Which is the correct implementation?

Options

  • APublic class DrawList implements Sortable, Implements Drawable { public void sort()
  • BPublic class DrawList extends Sortable, Drawable {
  • CPublic class DrawList implements Sortable, Drawable { public void sort() { /implementation/}
  • DPublic class DrawList extends Sortable, extends Sortable, extends Drawable { public void sort()

How the community answered

(20 responses)
  • A
    5% (1)
  • B
    5% (1)
  • C
    75% (15)
  • D
    15% (3)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice