data structure lab 1

ahmeddxn7
DateTypeDriver.cpp

/* * DateTypeDriver.cpp * * Created on: Jan 15, 2019 * Author: Ivan Temesvari * For: CSC 240 Pre-exercise * Objectives: Complete the compareTo function and write a driver program * to test the functionality of the DateType class. */ #include "DateType.h" #include <iostream> using namespace std; int main(){ DateType birthdate; birthdate.Initialize(7, 15, 1978); DateType today; today.Initialize(1, 15, 2019); cout << birthdate.compareTo(today) << endl; cout << today.compareTo(birthdate) << endl; cout << birthdate.compareTo(birthdate) << endl; return 0; }