An example to illustrate enforcing single responsibility in methods of a class