Pregunta de entrevista de Siemens

Oops concepts. Problem solving. 2 coding questions.