Ericsson interview question

Write OO code for a problem