Comp 345

Assignment 1

Due Date: 1/13/2005


Problem Statement:

Each semester I have to update my online course calendars to start on different dates.  This is a tedious time consuming process that I would like to avoid. 


Your goal is:

To modify an existing .htm calendar file to contain valid dates form a given starting date. 



TT calendars will remain so.

MWF calendars will remain so.

Ask the user for the new first date of the first week of class. Format (MMM D or MMM DD)

Ask the user if it is a leap year.


All files that represent TT calendars will have “TT” at the end of their name.

All files that represent MWF calendars will have a “MWF” at the end of their name.


Every month in the file will be represented by its 3 character abbreviation.

The number of the date will be represented as 2 characters. “ #” or “##”



Get the html source from the following web pages to test your program.





I will create a new web page to test your submitted programs.


I am giving you the following syntax just to get you thinking.





using namespace std;


void main()


char Months[12][4] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};

       int DaysInMonths[12] = {31,  28,    31,    30,    31,    30,    31,    31,    30,    31,    30,    31};


       for (int Month = 0; Month < 12; Month++)


              for (int Day = 1; Day <= DaysInMonths[Month]; Day++)


                     cout << Months[Month] << setw(3) << Day << endl;