Project 4 - A Personal Calendar

Due - Wednesday, December 13, 2006

The goal of this project is to give you more experience with arrays and other Java features. You will implement a program that manages a personal calendar. Your calendar will support the following operations:
  1. Add an appointment - A user must be able to add a new appointment by specifying the month, day, year, and time of the appointment as well as a short description of the meeting.
  2. Remove an appointment - A user must be able to delete an appointment which has been canceled.
  3. View all appointments - A user must be able to view all appointments in her calendar, in chronological order from most current to furthest in the future.
  4. View appointments for a given day - A user must be able to select this option, enter the desired day, and view all appointments for that day.
  5. Advance day - A user must be able to advance the day. If the user selects this option, she can set the day and the program will remove all appointments which have occurred prior to the present day.
Your program should provide the user with a menu of the five options described above and prompt for a selection. You must ensure that all user input is valid. Once a selection is made, perform the requested action and prompt for another selection.

Implementation Requirements and Hints

  1. At minimum, your program will implement a class Appointment that contains data for a single appointment and a class Calendar that represents the list of all appointments for the user.
  2. Each appointment will minimally include (1) a short description of the appointment (2) the appointment day (3) the appointment month and (4) the appointment year.
  3. The list of appointments will be kept in an array sorted by the day and time of the appointment. When a new item is added, it will be inserted into the correct position in the array.

Extra Credit Opportunity

For extra credit, implement a graphical user interface for your program.

Due 5:00PM, Wednesday December 13, 2006

  1. Complete and submit your working code. Turn in a hard copy in class and place a copy of all of your .java files in /home/submit/cs110/username.
  2. Make sure that each function is well documented. Your documentation should specify the type and function of the input parameters and output.
  3. Run your program on a variety of inputs ensuring that all error conditions are handled correctly.
Note: No portion of your code may be copied from any other source including another text book, a web page, or another student (current or former). You must provide citations for any sources you have used in designing and implementing your program.
Sami Rollins