Siemens interview question

design principles java