Highlands interview question

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