#ifndef Date_H
#define Date_H
namespace DateSpace
{
class Date
{
public:
Date();
Date(int = 1, int = 1, int = 1900);
int getDay(){ return Day;}
int getMonth(){ return Month; }
int getYear(){ return Year; }
void setDay(int Day);
void setMonth(int Month);
void setYear(int Year);
private:
int Day;
int Month;
int Year;
};
bool IsValidDate(int Day, int Month, int Year);
bool IsLeapYear(int Year);
}
#endif
===================================================
// File: Date.cpp; Name: Ethan Castanon
#include "Date.h"
namespace DateSpace
{
bool isLeapYear(int Year)
{
bool Leap;
if ((Year % 100 == 0) && (Year % 400 == 0))
Leap = 1;
else
if ((Year % 100 != 0) && (Year % 4 == 0))
Leap = 1;
else
Leap = 0;
return Leap;
}
bool isValidDate(int Day, int Month, int Year)
{
bool isVal;
isVal = 1;
return isVal;
}
void Date::setDay(int theDay)
{
isValudDate;
Day = theDay;
}
void Date::setMonth(int theMonth)
{
Month = theMonth;
}
void Date::setYear(int theYear)
{
Year = theYear;
}
}
===================================================
#include <iostream>
#include "Date.h"
using namespace std;
using namespace DateSpace;
int main()
{
}