Cognizant Interview Question

sql, java, 1 puzzle oops concepts thats it