#include <Year.h>
Inheritance diagram for Year:
Public Member Functions | |
Year () | |
Year (int monthVal, int dayVal, int yearVal) | |
virtual int | daysElapsed () |
Static Public Member Functions | |
static int | getDaysInYear () |
static double | percentOfYear (int daysElapsed) |
static bool | isLeapYear (int Year) |
Protected Attributes | |
int | month |
int | day |
int | year |
Static Protected Attributes | |
static int | daysInYear = 365 |
Year::Year | ( | ) |
Default Constructor: Do nothing
Year::Year | ( | int | monthVal, | |
int | dayVal, | |||
int | yearVal | |||
) |
Constructor: Mutator: Set the date components
monthVal | month | |
dayVal | day | |
yearval | year |
int Year::daysElapsed | ( | ) | [virtual] |
Facilitator: Determine days elapsed from data members
Reimplemented in LeapYear.
int Year::getDaysInYear | ( | ) | [static] |
Static, as the value is the same for all non-leap years
bool Year::isLeapYear | ( | int | Year | ) | [static] |
Determine if a year is a leap year Static, so it must take the year as an argument (Why??)
double Year::percentOfYear | ( | int | daysElapsed | ) | [static] |
Facilitator - static; same for all non-leap years
int Year::day [protected] |
int Year::daysInYear = 365 [static, protected] |
int Year::month [protected] |
int Year::year [protected] |