Pergunta de entrevista da empresa Capgemini

Write a C++ program to create a Date class that validates whether a given date is valid or invalid. The class should have private data members int day, int month, and int year. Declare the functions in the public section of the class to allow the user to input the date and validate it. The program should determine the validity of the date, considering leap years, and display the result accordingly.