Programming Assignments:                   

100 points for each program

Program 1 (control statements - chapter 5)

Code and test an application that has integer year, month, and day variables.  The program should add and subtract days and months from these fields.  Be complete in your test cases.

A leap year is divisible by four and, if divisible by 100, must also be divisible by 400. 

due Wednesday, September 9

Program 2 (classes - chapters 6, 8)

Code and test a date class called Date. There should be methods to display the date in numeric format and to add and subtract days and months.

There is a DateTime structure in C#, but do not use it. This is practice in class design.

due Wednesday, September 16

Program 3 (arrays - chapters 7, 20)

Code and test two two-dimensional arrays of doubles, each with five rows. The first should be a jagged array with the number of columns equal to the row index plus one. The second should be a symmetric, 2D array with five columns. The elements in the symmetric array should be set to the same or symmetric jagged array elements.

due Wednesday, September 23

Program 4 (strings - chapters 7, 21)

Modify the Date class in program 2 to include strings for the months of the year and for the days of the week.  Add a method to display the date using the month name and the day of the week (in addition to the day of the month).

due Wednesday, September 30

Program 5 (operator overloading, properties - chapters 9, 10)

Add operator overloads for operator+ and operator- to the Date class.

due Wednesday, October 7

Program 6 (inheritance and interfaces - chapters 11, 12)

Code and test a program that includes the Date class from program 5, the Time class from exam 1, and an abstract base class called Base from which both classes inherit.  In your code in Main, use Base references to Date and Time objects.  Do not use Date or Time references.

due Wednesday, October 14

Program 7 (partial classes - chapter 20)

Change the Date class to a partial class.

due Wednesday, October 21

Program 8 (indexers and exception handling - chapters 10, 13)

Code and test the addition of indexers and exceptions and exception handling to program assignment three. Throw an exception if any of the values of the dimensions of a figure are negative. Catch exceptions for out-of-array-bounds element access or assignment.

due Wednesday, October 28

Program 9(generics - chapter 18)

Code and test a generic class that contains the two arrays in program assignment three. The generic parameter should be the data type of the array elements. Use a value type constraint.

due Wednesday, November 4

Program 10 (file I/O - chapter 14)

Code and test a program that uses numeric data entered by the user, writes that data in binary format to a sequential file, closes the file, opens the file, reads the binary data, and displays the data at the terminal.

due Wednesday, November 18

Program 11 (collections - chapter 24)

Code and test the a generic List<T> of Date objects.

due Wednesday, November 25

Program 12 (delegates and events - chapter 15, Windows Forms applications - chapter 26)

Code and test a Windows Forms program that allows the user to select a sequential file, determines the size of the file, and shows the file name and its size.

due Wednesday, December 2