Pergunta de entrevista da empresa Microsoft

OOP concepts. Implement atoi and write test cases. How would you test for integer overflow even before performing atoi, in the atoi function that I had written. Class diagram for an e-commerce website.