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

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
laurentiu.spilca
Posts: 2
Joined: Tue Apr 30, 2019 6:49 am
Contact:

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

Post 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

Online
admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

You are right. The explanation is correct but belongs to line 4 instead of 3.

thank you for your feedback!

DazedTurtle
Posts: 26
Joined: Wed Oct 02, 2019 1:42 pm
Contact:

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

Post 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.

Online
admin
Site Admin
Posts: 10384
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

You are right. Fixed.
thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests