Page 1 of 1

About Question enthuware.oce-ejbd.v6.2.522 :

Posted: Sun Mar 04, 2018 1:25 pm
by nikitos
How is it possible that class implements interface explicitly,
and web service can include class methods and methods of the interface?
I'm little bit confused...
Class must implement all inteface methods in this case as it is not abstract.

Re: About Question enthuware.oce-ejbd.v6.2.522 :

Posted: Sun Mar 04, 2018 11:38 pm
by admin
Really sorry but I did not understand what you are asking. Yes, if a class lists an interface in its implements clause then it must either implement all the method of that interface or declare itself abstract. But I don't see this violated in this question.

Re: About Question enthuware.oce-ejbd.v6.2.522 :

Posted: Tue Feb 05, 2019 9:47 am
by henrid
I agree with TS. Since all methods in interface should be implemented, the first option is as correct as the second.

Re: About Question enthuware.oce-ejbd.v6.2.522 :

Posted: Tue Feb 05, 2019 10:36 pm
by admin
1. Option 1 cannot be correct because you don't know whether getRate and getBalance are part of TellerRemote but these two methods will be exposed as well. Option 1 does not include these methods.
2. Even if you assume that TellerRemote includes those two methods, you have to select only 1 option. Option 2, which says, "Both - getRate() and getBalance() plus the methods declared in TellerRemote interface." is the better option and must be selected.

Re: About Question enthuware.oce-ejbd.v6.2.522 :

Posted: Wed Feb 06, 2019 2:51 am
by henrid
Ah right, thanks!