SDSU CS 596
Fall Semester, 1998
Assignment 5
To Assignment Index
San Diego State University -- This page last updated 11/27/98

Due: December 9 in class for SDSU section.
December 10 in class for Qualcomm section.

The goal of this assignment is to get some experience AWT. In this assignment all interaction with the user is to be done using AWT.

Write a date adder program (not an applet). The user inputs a date (year, month, and day of the month). The user also provides the number of days to add/subtract from the date. Use a TextField for the input. Your program may use either the month names or integers for the input values for the months. Provide the user with an add button. When the user clicks the add button, your program adds the given number of days is added to the date. Display the resulting new date in your program's main window. Java.util.Calender, java.util.Date, and java.text.DateFormat will be useful. You can assume the user inputs only correct data. Do not use a GUI builder. All fields used are to be in the main window

Optional. Add a subtract button and allow the user to input two different dates. When the user clicks on the subtract button, display the number of days between the two dates. Display the number of days in the TextField used above for the number of days. All fields used are to be in the main widow. This means that the user can enter one date and a number of days to compute a new date, or enter two dates and compute the difference in days. The optional part should run as an applet.

Copyright © 1998 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA.
All rights reserved.

visitors since 11/27/98