GlobalLogic interview question

Logic coding questions ,star pattern,oops concepts