I created a Time class. Now I want to modify the code to perform input validation. Hour should be between 0-24, minutes and seconds between 0-59. If class need improvements, please offer suggestions.Time.h Header File#ifndef TIME_H#define TIME_Hclass Time{    private :        int hour;        int minute;        int second;    public :        Time(const int h = 0, const int m  = 0, const int s = 0);    //with default value        void setTime(const int h, const int m, const int s);        //  setter function        void print() const;       // Print a description of object in  hh:mm:ss        bool equals(Time) const;     //compare two time object};#endifTime.cpp implementation file#include <iostream>#include Time.hTime :: Time(const int h, const int m, const int s) : hour(h), minute (m), second(s){}void Time :: setTime(const int h, const int m, const int s) {     hour = h;     minute = m;     second = s;     }       void Time :: print() const{    (hour < 10) ? std::cout << 0 << hour : std::cout << hour;    std::cout << : ;    (minute < 10) ? std::cout << 0 << minute : std::cout << minute ;        std::cout << : ;    (second < 10) ? std::cout << 0 << second : std::cout << second ;    std::cout << \n ; }bool Time :: equals(Time otherTime) const{    if(hour == otherTime.hour && minute == otherTime.minute && second == otherTime.second)        return true;    else        return false;}main.cpp#include <iostream>#include Time.hint main(){   Time t1(10, 50, 59);   t1.print();   // 10:50:59   Time t2;   t2.print(); // 06:39:09   t2.setTime(6, 39, 9);   t2.print();  // 06:39:09   if(t1.equals(t2))        std::cout << Two objects are equal\n;    else        std::cout << Two objects are not equal\n;    return 0;}modified code of setTime for input validation (need suggestions) void Time :: setTime(const int h, const int m, const int s) {    if(h>=0 && h <=23)        hour = h;    else        hour = 0;    if(m>=0 && m <=59)        minute = m;    else        minute = 0;    if(s>=0 && s <=59)        second = s;    else        second = 0;    }       
Validating C++ Time class objects
c++;classes;datetime