Cognizant interview question

prime no program,factorial program, oops concept,mini project code