Infosys interview question

oops concept, mvc life cycle,sql query