This program was written in Java 11 by Sarah Jane Gregory and Dori Lin, completed on June 18, 2025. It implements JUnit4 for testing.
This is a class project from CS3500 Object-Oriented Design, where we built a calendar application for managing events. The project was divided into three parts with three versions of the final calendar program. The first version included all features for creating, editing, and displaying events for a single calendar, using a Model-View-Controller architecture. The second version added support for multiple calendars with different time zones. The third and final version added a GUI that allows for creating and showing events from a selected date. We utilized several design patterns that we learned throughout the semester, including the factory method, builder, and command design patterns.
This is a reupload of the original Github repo with minor changes to the README and USEME files.
How to run the program:
To run our calendar program using the JAR file, you must use the terminal/command prompt. Navigate to the res folder before you run the jar. You must type "java -jar CalendarPart1.jar" to run the GUI. You must type "java -jar CalendarPart1.jar --mode interactive" to run interactive mode. You must type "java -jar CalendarPart1.jar --mode headless" then the full path to the text file to run headless mode. For example, a correct call would be: "java -jar CalendarPart1.jar --mode headless /Users/username/Downloads/Calendar-App/res/Assignment5ValidCommand.txt"
The GUI supports creating events with a start date and time, an end date and time, and a subject. It displays both a monthly view of the calendar and a schedule view of up to 10 events starting from a selected date on the calendar.
Refer to USEME.md for instructions on how to use the GUI.
The full list of commands supported in the interactive and headless modes is as follows:
create calendar --name <calName> --timezone area/location
edit calendar --name <name-of-calendar> --property <property-name> <new-property-value>
use calendar --name <name-of-calendar>
copy event <eventName> on <dateStringTtimeString> --target <calendarName> to <dateStringTtimeString>
copy events on <dateString> --target <calendarName> to <dateString>
copy events between <dateString> and <dateString> --target <calendarName> to <dateString>
create event <subject> from <YYYY-MM-DDTHH:MM> to <YYYY-MM-DDTHH:MM>
create event <subject> from <YYYY-MM-DDTHH:MM> to <YYYY-MM-DDTHH:MM> repeats <MTWRFSU> for <N> times
create event <subject> from <YYYY-MM-DDTHH:MM> to <YYYY-MM-DDTHH:MM> repeats <MTWRFSU> until <YYYY-MM-DD>
create event <subject> on <YYYY-MM-DD>
create event <subject> on <YYYY-MM-DD> repeats <MTWRFSU> for <N> times
create event <subject> on <YYYY-MM-DD> repeats <MTWRFSU> until <YYYY-MM-DD>
edit event <property> <subject> from <YYYY-MM-DDTHH:MM> to <YYYY-MM-DDTHH:MM> with <new property>
edit events <property> <subject> from <YYYY-MM-DDTHH:MM> with <new property>
edit series <property> <subject> from <YYYY-MM-DDTHH:MM> with <new property>
print events on <YYYY-MM-DD>
print events from <YYYY-MM-DDTHH:MM> to <YYYY-MM-DDTHH:MM>
show status on <YYYY-MM-DDTHH:MM>
quit
Subjects and descriptions with multiple words must be typed in quotation marks. Making any edit to one event in a series will remove it from that series, regardless of the property changed. Changing several events in a series will only remove them from the series if the start date or time is changed. The changed events become a new series. Only the commands from the assignment have been implemented, so there is no way for the user to remove events.
When possible, copying multiple events from one calendar to another will preserve their status as in a series. However, if adjusting the time zone while copying causes events in a series to span multiple days, those events will become standalone events and will not be connected to the other events in that series. Adjusting the time zone on a calendar will also apply the same logic and convert events in a series to standalone events if they span multiple days.