Tatvasoft interview question

oops questions and patterns questions.