Siemens interview question

Question in front end and backend