1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
//date.h header
#include <iostream>
#include <string>
using namespace std;
enum DateFormat {numeric, standard, alternative};
const int MIN_YEAR = 1900;
const int MAX_YEAR = 2015;
const string monthStr [] =
{"January", "February", "March", "April", "May", "June",
"July", "August", "September", "October", "November",
"December"};
const int monthDays [] =
{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
class Date // Class body and declartions
{
private:
int month;
int day;
int year;
bool isDateValid (int m, int d, int y);
public:
Date (int m, int d, int y); // 3 argument constructor
void getValues();
}; // End of class declaration
|