Nokia interview question

OOP related questions and nested for-loop coding