Professional Documents
Culture Documents
"Addresstype.H": #Ifndef H - Datetype #Define H - Datetype #Include #Include #Include
"Addresstype.H": #Ifndef H - Datetype #Define H - Datetype #Include #Include #Include
#ifndef H_dateType
#define H_dateType
#include <iostream> //utilized to instate basic I/O functionality.
#include <string> //implemented to utilize string datatype.
#include "addressType.h" //references external header file.
//standard library
using namespace std; //allows the use of cout & endl without 'std::' prefix.
class dateType
{
public:
void setDate(int month, int day, int year);
//Function to set the date.
//The member variables dMonth, dDay, and dYear are set
//according to the parameters
//Postcondition: dMonth = month; dDay = day;
// dYear = year
bool isLeapYear();
//Function to determine whether the year is a leap year.
private:
int dMonth; //variable to store the month
int dDay; //variable to store the day
int dYear; //variable to store the year
};
#endif