Now, we can implement the population service. This service will be responsible for handling the interactions with the World Bank APIs.
Here's how it should look:
Since we will be calling an API, our method calls cannot immediately return the results. We'll thus use promises again to indicate that the methods are asynchronous.
Also, we are now going to use modules, so we might as well make that clear in our UML diagram. We can do so using packages, which are simply containers for design elements:
UML packages have a name, which defines a namespace for the components that they contain.
Let's now turn this UML diagram into actual code.