Layer (Germany) interview question

Clean Code design exercise