Shared classes
This is the more obvious of the two problems. We've created a new module and designed a method in a class to return a list of Contact instances. The problem is that the Contact and Address model classes are not in the module! They are in the packt.addressbook module. Compiling this module now will result in a compilation error about the two classes not found. How do we solve this?
Here's a thought. How about depending on the module that contains the classes? The packt.contact module needs the Contact and Address classes that are available in the packt.addressbook module. Could we have the packt.contact module require the packt.addressbook module? We'll of course also need the dependency the other way round. packt.addressbook ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access