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

Moderator: admin

Post Reply
nikitos
Posts: 21
Joined: Mon Oct 24, 2016 6:55 am
Contact:

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

Post by nikitos » Sun Mar 04, 2018 1:25 pm

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.

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

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

Post by admin » Sun Mar 04, 2018 11:38 pm

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.
If you like our products and services, please help us by posting your review here.

henrid
Posts: 34
Joined: Sun Oct 13, 2013 1:20 pm
Contact:

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

Post by henrid » Tue Feb 05, 2019 9:47 am

I agree with TS. Since all methods in interface should be implemented, the first option is as correct as the second.

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

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

Post by admin » Tue Feb 05, 2019 10:36 pm

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.
If you like our products and services, please help us by posting your review here.

henrid
Posts: 34
Joined: Sun Oct 13, 2013 1:20 pm
Contact:

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

Post by henrid » Wed Feb 06, 2019 2:51 am

Ah right, thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests