CGI interview question

oops concepts