Code as per MVC Architechture