Procedural programming is a technique where a program is divided into small functions. Each module contains a number of variables to store different kinds of data and functions to operate on that data. While this approach is very simple, it can get much more complex as the application grows because we end up having functions all over the place. If one function changes, it requires the other functions to change. This strong interdependency between functions means that we end up with spaghetti code. This approach not only adds duplicate code in every part of the application, it also makes maintaining the code more difficult.
Take a look at the following example. Here, three variables are provided to the display function. By looking at variable names, we can gather that the function prints person-related information on the screen. There is no direct relation between...