CS182 -- Lab 5: Day of the Week



->Courses
->CS182
-->Homework
-->Quiz 1
-->Lab 1
-->Lab 2
-->Lab 3
-->Lab 4
->Lab 5
-->Lab 6
-->Project
->Electronic Submission
->Old Exams
->C++ Examples
->MSVC Info
->Software
->Tentative Schedule
->Support Forum
->Course Policies

[Courses]
[Rich][Home][Rich]
[Author]

Winter Quarter 2001-2002

Every day is unique. Each date comes only once and then it's gone. Which explains why I have to buy a new calendar every year.
Michael McCuiston

Overview

In this lab, you should develop skills using functions.

Procedures

Write a program that will ask the user to enter a date and display the day of the week that the date falls on.

Notes:

  • This is not as simple as it may appear.
  • You may have one date hard coded in your program. For example, you may say that January 1, 2002 is a Tuesday.
  • You may hard code the number of days in each month in your program
  • A year is a leap year if the year is either divisible by 400 (e.g., 2000) or not divisible by 100 but is divisible by 4 (e.g., 2004).
  • Your program should give valid answers for dates between December 14, 1969 and July 31, 2972.

Lab report (due 11:00pm, the day prior to week 7 lab)

The lab report should be in your own words but need not be self-contained. Your report should include:

  • Which functions you chose to write and why.
  • Documented source code for your program.
  • Discussion (sample program results for the following dates: 12-14-1969, 2-29-2004, 8-12-1983, and 2-14-2600, problems you encountered (and how they were overcome), etc.)
  • A summary of your activity log indicating how much time you spent on each phase of the assignment. Please report the time in the following categories:
    • Design
    • Coding
    • Debug (before you think it's working)
    • Test (after you think it's working)
    • Documentation
    • Other
  • Conclusions (what you learned, suggestions of how the assignment could be improved, things you would have done differently, etc.)

As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic submission guidelines. (You may wish to consult the sample report before submitting your report.) Be sure to keep copies of all your files, in case something gets lost. It may be wise to keep a diskette backup as well.

Your grade will depend on quality of design, clarity of code and documentation, as well as whether your program produces the correct results. If you have any questions, consult your instructor.

© 2001 Dr. Christopher C. Taylor Office: CC-27C Phone: 277-7339 Last Updated: November 28, 2001
I am responsible for all content posted on these pages; MSOE is welcome to share these opinions but may not want to.