About Question enthuware.ocpjp.ii.v11.2.3432 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
imrankhurshid
Posts: 1
Joined: Mon Jul 08, 2019 10:37 pm
Contact:

About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by imrankhurshid »

in explantion on first option its mentioned that Since database package is not used by any other module, there is no need to export it from the service module. but in question it stats Classes in the service package use classes from the dto and the database package .so databse package is used by service module

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

Re: About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by admin »

Yes, database package is used by the service module. But database is not a separate module. It is part of the service module itself and so, it can be accessed by other classes of the service module. There is no need to export database package from the service module because it is not used by any other module.
If you like our products and services, please help us by posting your review here.

sir_Anduin@yahoo.de
Posts: 62
Joined: Fri Aug 07, 2015 2:16 pm
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by sir_Anduin@yahoo.de »

My idea was to make databse an automatic module. That way it can be required by the service module. This is why I chekced answer 3.
What is wrong with my attempt?

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

Re: About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by admin »

Option 3 is incorrect because that would create 4 modules. The problem statement wants you to do it in three modules.
If you like our products and services, please help us by posting your review here.

sir_Anduin@yahoo.de
Posts: 62
Joined: Fri Aug 07, 2015 2:16 pm
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by sir_Anduin@yahoo.de »

module acme.provisioning.service {  
  exports com.acme.provisioning.service;  
  requires acme.provisioning.dto; }

why is the requires without "com."

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

Re: About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by admin »

No reason. One can name the module anything. It doesn't have to start with com.
If you like our products and services, please help us by posting your review here.

alfredo.zuloaga
Posts: 10
Joined: Fri Nov 18, 2016 5:48 pm
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by alfredo.zuloaga »

You said . But database is not a separate module. It is part of the service module itself and so

How do determine that, with this sentence ?
Classes in the database package use classes from the dto package.

because if module-info of database is
exports com.acme.provisioning.database
requires "DTO"

this option works as well

module acme.provisioning.service{
exports com.acme.provisioning.service;
requires com.acme.provisioning.database;
requires acme.provisioning.dto;
}

but if is this also
exports com.acme.provisioning.database
requires "DTO" transitive

you can
module acme.provisioning.service{   
 exports com.acme.provisioning.service;    requires acme.provisioning.dto; }

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

Re: About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by admin »

alfredo.zuloaga wrote:
Mon Apr 12, 2021 10:54 pm
You said . But database is not a separate module. It is part of the service module itself and so

How do determine that, with this sentence ?
Classes in the database package use classes from the dto package.
You determine that from the problem statement, which says, "You want to modularize the application into three modules - client, service, and dto."
Therefore, it is clear that no module is expected for database classes.
If you like our products and services, please help us by posting your review here.

vts.vts
Posts: 2
Joined: Wed Aug 25, 2021 7:44 am
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by vts.vts »

admin wrote:
Mon Apr 12, 2021 11:21 pm
You determine that from the problem statement, which says, "You want to modularize the application into three modules - client, service, and dto."
Therefore, it is clear that no module is expected for database classes.
I'm not the OP, but it's still not clear to me. How do I determine that the database package is in the service module and not in client or dto module?
It makes sense to put it to the service module because the service package is the only one using the database package, but it could be in any module.

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

Re: About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by admin »

No, database classes cannot be in the client module because service classes don't depend on client, right? client classes depend on service.

Yes, database classes can be in the dto module but that possibility is not there among any of the options. So, only option 2 can be right.
If you like our products and services, please help us by posting your review here.

samba2
Posts: 6
Joined: Mon Sep 06, 2021 1:13 am
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by samba2 »

Was on the same path as user vts.vts. Would the exam misguide you similarly ?

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

Re: About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by admin »

There is no misguiding in this question. Please see the response above. Which part do you think is misguiding, please tell so that we can provide more clarification and improve the question.
If you like our products and services, please help us by posting your review here.

AlienFS
Posts: 7
Joined: Tue Sep 05, 2023 4:07 am
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by AlienFS »

I didn't pick your answer, because I expected the correct answer to have "requires com.acme.provisioning.dto". So I thought it was a trick question since you wrote "requires acme.provisioning.dto;".

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

Re: About Question enthuware.ocpjp.ii.v11.2.3432 :

Post by admin »

You are right. com. is missing. Fixed.
thank you for your feedback!
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 35 guests