![]()
|
JT's Appointment Reminder Applet:This program implements a Java based Appointment reminder application. This applet allows the user to select a number of meeting times, and be notified of these meetings with a dialog box that will continuously alert the user of this meeting. My motivation behind selecting this project is that I NEED such a program!! I am rarely in my office and most calendar programs simply beep once for an appointment alert. This program will announce the meeting until the alert box is closed. The main reason for writing this program was that this was the final programming assignment for an object oriented design class at Boston University.
2.0 Implementation This program creates its own frame for the display of the appointment reminder which allows the user to use the browser for other purposes. This frame can be iconized or closed, and can stay active until the browser is closed. This applet launches a Thread that monitors the system time and checks whether an appointment alert should be displayed. An appointment alert is displayed by creating a dialog box. This dialog box creates two threads; one for an audio loop and another for an animation loop. The animation loop displays a sequence of gif images of a dog running across the dialog box. This loop currently executes continuously, however my future intention is to synchronize this loop with the audio thread so the dog will sit down when it has stopped barking. The audio thread plays an audio file of a dog bark. When the dialog box is created the 'dog' will bark for 30 seconds, and then bark a couple of times every minute until the dialog box is closed. This audio loop launches a separate 'timer' thread for determining the idle time between barking loops. A menu option allows customization and testing of the Alert dialog box.
3.0 Design Patterns Please note that subsequent work on this application did not continue the use of the Command pattern, as this pattern tends to create many class files, which is not advised for web programming. The second pattern implemented is the builder pattern. This pattern is used to separate the construction operation of the display from the implementation of the display. This will allow easy changes to the 'type' of future display implementations. The current display implementation uses checkboxes for the meeting times, while future implementations might look more like an appointment calendar. The Builder pattern allows such flexibility by decoupling the design algorithm (the Director object) from the display implementation (the concrete builder object). To implement changes in the future it may be possible to just create a new concrete Builder while maintaining the present Director. If the changes involve new procedures for building the object it may be necessary to implement both new Directors and Builders. Other patterns that are implicitly used are the Chain of Responsibility pattern for handling the user interaction and the Composite pattern for the AWT components used.
I would love to hear from you if you find this code to be useful, or if you have general questions about the code. John Thibeault jt_too@geocities.com Source Code:Please note that this code WAS nicely formatted, however viewing this code via html doesn't provide very good formatting.
This file contains the code for the applet, the applet thread, the display Frame object, and the Alert Options dialog box.
This file contains the code for the Alert dialog box and its associated thread which performs the barking loop as well as the animated gif code.
This file contains the code for the Builder pattern consisting of Director objects and concrete builder objects
This file contains the code for the Command pattern and the objects which implement this pattern.
This file contains the code for the 'Day display' object that displays the daily appointment times that can be scheduled.
This file contains the code for the 'Week display' object that displays the days of the week.
This file contains general support code for display features.
Last updated 8/8/1997 |