3.7 Parameterize Method
When you’re developing software, you’re not always aware of the entire scope of the project. That means some requirements might be hiding nearby, but you don’t know about them. You sit comfortably, hoping that what you’re doing now doesn’t change or outgrow your expectations.
In this exercise you’ll see a case where you assume something in the first place, but that can turn around to bite you later. You’ll learn how to prevent a dreadful scenario of radical change by replacing potentially three or more methods into a single one.