Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

public class DS1203 {public static void main (String() args) {circusPerformer iv

ID: 3820601 • Letter: P

Question

public class DS1203 {public static void main (String() args) {circusPerformer ivan = new circusPerformer ();}} interface CircusPerformer {public String getperformer (); public void act (); public void entrance (); public void performance (); public void exit ();} Which of the following are reason(s) why the program does not compile? I. CircusPerformer is abstract and cannot be used to instantiate an object. II. The CircusPerformer interface is not implemented by the required classes. III. There is no constructor defined in interface CircusPerformer. (A) I only (B) II only (C) III only (D) I and II only (E) I, II and III

Explanation / Answer

Answer is (A).

CircusPerformer is abstract; cannot be instantiated

We can not instantiate an object of interfcae because it is abstract.

Though some implementation of CircusPerformer can be instantiated

for example

public class RingMaster implements CircusPerformer

{

....

// some code

}

then in main we can write

CircusPerformer ivan = new RingMaster();

Hope this helped.

Please leave a positive rating if this answered your question.