Cognizant interview question

Implementation of method overloading code