CS 596 Fall Semester, 1998 Assignment 5 | ||
---|---|---|
San Diego State University -- This page last updated 11/27/98 |
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.