October 14, 2018
The Single Level of Abstraction Principle (SLAP)
The Single Level of Abstraction Principle (SLAP) tells us that each method should work at a single level of abstraction, but what does that mean? The Problem Let’s look at the following code that prints the numbers 1 to 35. It’s a bit of a nonsensical example but it’ll do for the discussion that follows: class Main { public static...