Using the include DateOrig.cpp file as a starting point,restructure the code so that:
- The main function resides in a file called DateTest.cpp.
- Separate your date class so that the declarations reside in afile called Date.h.
- Put the definitions (functions bodies) in a file calledDate.cpp.
- Make sure that the Date class is protected against multipleinclusions.
#include <iostream>
#include “DateUtil.h”
using namespace std;
class Date
{
private:
int day;
int month;
int year;
public:
Date() {getCurrentDate(day,month,year);}
Date(int d, int m, int y):day(d),month(m),year(y) {}
int getDay() const { return day; } ;
void setDay(int d) {day = d;}
int getMonth() const {return month;}
void setMonth(int m) {month = m;}
int getYear() const { return year; }
void setYear(int y) { year = y; }
void displayDate()
{
cout
OR
OR