package chainOfResponsibility; public class Handler { public void HandleRequest(Request req) { switch (req.GetKind()) { case Request.HELP: HandleHelp(req); break; case Request.PRINT: HandlePrint(req); break; default: // ... break; } } protected void HandlePrint(Request req) { // ... } protected void HandleHelp(Request req) { // ... }}