Stubs & Drivers in Programming
Sometimes, while creating a project it may happen that you want to test current functionality of the program, but that cannot be done because all of the required methods or functions have not been created or some of the functionality is still missing. Lets take a look into Stub. What is a Stub? A stub is a method with few or no code(only the declaration exists, no Implementation). The stub usually contains the default return value and parameters(which may or may not change in the future). The purpose of the stub is to let the program execute with default values in most of the places. By this you can check if the program works correctly or not. How it works? suppose I have a function which gets data from database but I haven’t written the code for fetching the data. I have another function display() which calls the method getData() and displays the returned arrayList to the User. But, IDK if display() function is working or not because the function getData() does not exist right n...