Pregunta de entrevista de Highlands

Simple coding problem and some question about Automation testing as well as oops concept