Dependencies injection pattern
The Hollywood principle (https://en.wikipedia.org/wiki/Hollywood_principle) is stated as "don't call us, we'll call you". One might hear this response after auditioning for a role in a movie. It won't work if the candidates call the recruiting agency every day. The agency would get swamped with calls if there were many candidates.
Instead, the agency will call back if they find someone suitable and want to take it forward.
This Inversion Of Control (IoC) applies to software designs too. IoC is different from other more traditional forms of programming.
Refer to https://techbizcurry.wordpress.com/2014/04/07/hollywood-principle-inversion-of-control-design-pattern/ for an excellent explanation.
Here is a real-world scenario. Test-first development advocates writing tests before you write the production code. Following this advice makes for better code, as it gives us a test harness. A test harness, in turn, would make us more confident in refactoring the code base...