• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Sybex CSG 11: Possible Erratum in the OCP Java SE 11 Developer Complete Study Guide

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The second sentence in the note at the end of page 827 of the study guide is quite confusing indeed. Elsewhere in the study guide, the authors clearly explained that the provides keyword specifies that a module employs a class to provide an implementation of a service. In agreement with this explanation, the study guide also states thus, in the third-to-last and penultimate sentences of the last paragraph on the same page (i.e., page 827), just before the aforementioned note on that page: “Instead, we use the provides directive. This allows us to specify that we provide an implementation of the interface with a specific implementation class.

Consider the following two points: (1) The foregoing clear and lucid explanations provided in the study guide, on the mechanism by which a module employs a class to provide an implementation of a service and (2) The fact that the arrow from the service provider interface module to the service provider module, in Figure 17.10 (on page 823), has been formally acknowledged to be amongst other errata in the study guide, because it points the wrong way. Based on these foregoing two points, shouldn’t that second sentence, in the note at the end of page 827, be more like the sentence in the point number 1, rather than be exactly the sentence in the point number 2, below:

(1.) “Instead, we have made the implementation available to a service provider interface using the class”?

(2.) “Instead, we have made the implementation available to a service provider using the interface”?

Correct me if I wrong, but the following is the way I understand how the module dependency arrow, between the service provider interface module and the service provider module in Figure 17.10, should work:

(3.) The arrow should point from the service provider module to the service provider interface module, because the former module requires a package provisioned in the latter module.

(4.) The arrow should not point from the service provider interface module to the service provider module, even though the latter module employs a class to provide an implementation of a service provisioned in the former module, because the direction of a dependency arrow specifies that a module requires another module, rather than specifies that a module provides an implementation of a service provisioned in another module.
 
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic