The George Washington University
School of Engineering and Applied Science
Department of Electrical Engineering and Computer Science
CSci 51 -- Spring 1999
Lab Exercise for February 18-19, 1999

The goal of this project is to give you some more experience in working with packages and enumeration types. The project depends upon material in Chapters 3 and 4.

You are to write a program that prompts the user for a date, then displays the day of the week on which that date occurs (e.g. September 24, 1992 is on a Thursday).

The month will be entered as a 3-letter enumeration literal (Jan, Feb, etc). The month and the day of the week should be displayed as above, with the only the first letter in uppercase.

The day will be entered as an integer in the predefined subtype Ada.Calendar.Day_Number; the year will be entered as an integer in the predefined subtype Ada.Calendar.Year_Number.

To find the day of the week, use the package DayWeek in the programs directory. The specification is in dayweek.ads; the body is in dayweek.adb. This package is not in the book, but it is online in the programs directory. A simple program, DayTest, that demonstrates the package is in daytest.adb.