Page 1 of 1

About Question enthuware.ocpjp.i.v11.2.3041 :

Posted: Tue Apr 30, 2019 6:55 am
by laurentiu.spilca
Hello,

For this question, you have marked that line //3 is causing a compilation error as a correct answer. But I think it actually is line //4 with that correct explanation as well.

Line //3 is abstract class PowerTool implements Tool{ } //3

So a call implements an interface (Tool) .. This is correct

Line //4 is : class PowerSaw implements PowerTool{ //4

So class implements a class... this is not correct.

So in my opinion, line 4 not line 3 is causing a problem here.

Please let me know your opinions.

Thank you,
Laurentiu

Re: About Question enthuware.ocpjp.i.v11.2.3041 :

Posted: Tue Apr 30, 2019 8:12 am
by admin
You are right. The explanation is correct but belongs to line 4 instead of 3.

thank you for your feedback!

Re: About Question enthuware.ocpjp.i.v11.2.3041 :

Posted: Wed Nov 06, 2019 5:35 pm
by DazedTurtle
The first line of the explanation for why //4 would cause an error, while correct, doesn't seem to apply to the actual question:
A class cannot "extend" an interface. It can only "implement" it.
But that bit is about this line, which neither extends something nor mentions an interface:

Code: Select all

class PowerSaw implements PowerTool{  //4
It seems like it would be better to say (changes in bold)
A class cannot "implement" another class. It can only "extend" it.

Re: About Question enthuware.ocpjp.i.v11.2.3041 :

Posted: Wed Nov 06, 2019 9:11 pm
by admin
You are right. Fixed.
thank you for your feedback!