Homework 2:
Due Thursday 04/24/03, 9:30pm. Put all printouts in my homework box in the computer lab. All papers must be stapled together.
In this assignment, you will take your code from Homework 1 and modify it so that your calender CGI program has the following properties:
- All web pages should be produced by one CGI program. You shouldn't have to rely upon static web pages. There is no longer a separate query page. All HTML must be produced with CGI.pm methods. You can use the object-oriented or functional-interface.
- The CGI program should present a calender (like HW1) with the following additions on the page:
- It should have two pull-down or pop-up menus that allow a user select a month and year to display. Limit the year selection to 1900-2100, inclusive.
- There should be two links or buttons that lets the user view the previous or next month so that they don't have to use the menus. Hint: The buttons or links should point to a URL that contains the query string to produce the correct month and year. You will need to write this logic into your CGI code.
- You are free to decide on the look-and-feel of the web page.
- The first time a person visits your CGI program, it should display the current month and year.
- Each time the calender is displayed, it should set a cookie on the user's browser so that if the user quits and returns later, the CGI program should display the last month and year the user had viewed.
Turning in your homework:
- Turn in a printout of your code.
- Turn in several screen shots demonstrating that your code works. Order and annotate your screen shots so I tell what you did to produce them. For example, if the third screen shot shows April, 1997, and the forth screen shot shows March, 1997, tell me what clicked on the April, 1997 page to produce the March, 1997 page.