CS 205 - Programming for the Sciences
Spring 2008 - Programming Assignment 5

20 points


Out: March 27, 2008
Due: April 3, 2008


Consider an application like an appointment book. One of the types of objects that such an application would need is a Date object. In this assignment, you will write a Date class that models a calendar date. (C# has a built-in DateTime class that models both date and time together in one object, but we'll make up our own Date class that just models a date.) The Date class consists of three private integer attributes representing the day, month, and year of a Date and the following public methods:



For this assignment, you are given a compressed solution folder DateDemo.zip that contains a project solution with the following GUI that will allow you to test a Date class meeting the specification above. A sample of the results that should be displayed by the GUI is also shown.





Assignment

Download the compressed solution folder DateDemo.zip from the course webpage.


Complete the Date Demo program in the same manner as was done for the Rational number demo in-class exercise. To get you started, declaration of the attributes and the implementations of the properties and the empty constructor have been provided in Date.cs. You need to complete the rest of the Date class as specified above. (Ignore the warnings about Equals and HashCode.) The handlers for the GUI buttons are to do the following:



What to submit

For full credit, a compressed (zipped) solution folder containing a C# project must be submitted as an attachment to an email to Dr. Hwang (hwang@evansville.edu) no later than 4:30pm on the due date.


To create a compressed solution folder find the solution folder via Windows Explorer. Right-click on the solution folder, select Send To, then select Compressed (zipped) folder. This will created a compressed folder of the same name as the solution folder with extension .zip and an icon of a folder with a zipper.


03/27/08 2 of 2