Cognizant Interview Question

java oops scenario based questions