So the resulting code will be like this. As you can see here,
now I don't have the conditionals any longer, but I just have a call to
this notEligibleForDisability method. And this makes the code so
much clearer, because if I just need to understand how disabilityAmount works,
I can clearly see there is an initial check that is actually checking whether
an employee's eligible for disabilities or not. And if the check is false, so
if the employee's eligible, then I'll just perform the rest of the computation.
Otherwise I'll simply return zero.
So if I don't need to understand the details of this check,
I can simply look at this method and understand it all. And if I need to look at
the details I can just go, and look at the implementation of this method,
and I will get exactly the same information that I have here. But I'm sort of
separating the concerns, and making the code overall more understandable, and
therefore more maintainable, which is the main goal of refactoring.