Problem Solving and Computing (CSC-103 98S)

[Instructions] [Search] [Current] [Changes] [Syllabus] [Handouts] [Outlines] [Journal] [Problems] [Computing] [SamR Docs] [Tutorial] [API]

Computing Assignment Ten: Dates

Assigned: Thursday, April 9, 1998
Questions 1 and 2 due: Tuesday, April 14, 1998
Question 3 due:: Thursday, April 16, 1998

Question 1: Computing the "distance" between two dates

Write an algorithm that determines the number of days between two dates. For example, if given April 1, 1998 and April 3, 1998 as input, it would compute the value 2. Your algorithm should handle dates in different months and different years.

Question 2: Computing the day of the week for a date

Write an algorithm that takes a date as input and computes which day of the week that date falls on.

Question 3: Implementing Your Algorithms

Write a Java class, DateComputer that includes implementations of your two algorithms. You will also need to write a main routine (either in DateComputer or in a separate class) that reads in the dates and computes the appropriate values.

[Instructions] [Search] [Current] [Changes] [Syllabus] [Handouts] [Outlines] [Journal] [Problems] [Computing] [SamR Docs] [Tutorial] [API]

Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

Source text last modified Thu Apr 9 12:26:33 1998.

This page generated on Thu Apr 9 12:31:26 1998 by SiteWeaver.

Contact our webmaster at