Vicky interview question

Basic oops, pattern printing, easy coding question