I need help on how to make my derived functions to work with the ABC. Is their away to cast or something. My teacher said to make all of the functions in the ABC pure virtual and to have the parameter to be "const Comparable &other" but I need the parameters in the child classes to be as I have them. Can anyone help please?
Code:
 namespace MRDateTime
{
class Comparable
{
public:
virtual bool operator==(const Comparable &other)const = 0;

virtual bool operator!=(const Comparable &other)const = 0;

virtual bool operator<(const Comparable &other)const = 0;

virtual bool operator<=(const Comparable &other)const = 0;

virtual bool operator>(const Comparable &other)const = 0;

virtual bool operator>=(const Comparable &other)const = 0;

virtual void input(istream& sin) = 0;

virtual void print(ostream& sout) const = 0;

};
}
namespace MRDateTime
{
static const short HOURS_IN_DAY = 24;
static const short MIN_SEC = 60;

class CTime: virtual public Comparable
{
public:
CTime() {setCurrentTime();};
CTime(short hour, short minute = 0, short second = 0);

short getHour() const {return mHour;};
short getMinute() const {return mMinute;};
short getSecond() const {return mSecond;};

virtual bool operator==(const CTime &time) const;
virtual bool operator!=(const CTime &time) const;
virtual bool operator<(const CTime &time) const;
virtual bool operator<=(const CTime &time) const;
virtual bool operator>(const CTime &time) const;
virtual bool operator>=(const CTime &time) const;

virtual void print(ostream &sout) const;
virtual void input(istream &sin);

void setCurrentTime();

protected:
short mHour;
short mMinute;
short mSecond;

};

ostream& operator<<(ostream& sout, const CTime& time);
istream& operator>>(istream& sin, CTime& time);
}
namespace MRDateTime
{
static const unsigned int FIRSTYEAR = 1760;
static const CDay STARTDAY = TUESDAY;
static const unsigned int TOTALMONTHS = 12;
static const unsigned int TOTALWEEKDAYS = 7;
static const unsigned int TOTALYEARDAYS = 365;

class CDate: virtual public Comparable
{
public:
CDate(short dayOfMth = 1, CMonth month = JANUARY, short year = 1760);


virtual bool operator==(const CDate &date) const;
virtual bool operator!=(const CDate &date) const;
virtual bool operator<(const CDate &date) const;
virtual bool operator<=(const CDate &date) const;
virtual bool operator>(const CDate &date) const;
virtual bool operator>=(const CDate &date) const;

virtual void print(ostream& sout) const;
virtual void input(istream& sin);

static bool isLeapYear(unsigned int year);
static short daysInMth(CMonth &month, short year); //if february and leap year return 29
static string monthNames(short month);
static string dayNames(short day);

CDate yesterday();
CDate tomorrow();

void setCurrentDate();
unsigned int getYear() const {return mYear;};
short getDayOfMth() const {return mDayOfMth;};
CDay getDayOfWk() const {return mDayOfWk;};
CMonth getMonth() const {return mMonth;};
short getDayOfYear() const {return mDayOfYear;};

void setYear(int year) {mYear = year;};
void setDayOfMth(short day) {mDayOfMth = day;};
void setMonth(CMonth &month) {mMonth = month;};



protected:
unsigned int mYear;
short mDayOfMth;
CDay mDayOfWk;
CMonth mMonth;
short mDayOfYear;
private:
static short countLeaps(short year);

void setDayOfYear(short year, CMonth month, short dayOfMonth);
void setDayOfYear(short day) {mDayOfYear = day;};
void setDayOfWeek(short year);
void setDayOfWk(CDay &day) {mDayOfWk = day;};

};

ostream& operator<<(ostream& sout, const CDate& date);
istream& operator>>(istream& sin, CDate& date);
}
namespace MRDateTime
{

class CDateTime: public CDate, public CTime
{
public:
CDateTime() {setCurrentDate(); setCurrentTime();};
CDateTime(const CDate& date, const CTime& time)
:CDate(getDayOfMth(), getMonth(), getYear()), CTime(getHour(), getMinute(), getSecond()) {};
CDateTime(short dayOfMonth, CMonth month = JANUARY, short year= 0, short hour = 0, short minute = 0, short second = 0)
:CDate(dayOfMonth, month, year), CTime(hour, minute, second) {};


virtual void print(ostream& sout) const;
virtual void input(istream& sin);

virtual bool operator==(const CDateTime &dateTime) const;
virtual bool operator!=(const CDateTime &dateTime) const;
virtual bool operator<(const CDateTime &dateTime) const;
virtual bool operator<=(const CDateTime &dateTime) const;
virtual bool operator>(const CDateTime &dateTime) const;
virtual bool operator>=(const CDateTime &dateTime) const;


};

ostream& operator<<(ostream& sout, const CDateTime& dateTime);
istream& operator>>(istream& sin, CDateTime& dateTime);
}