Skip to content

ayushvarma7/calendar-management-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Multi-Calendar Management System

A comprehensive calendar application demonstrating advanced software engineering principles, built with Test-Driven Development and SOLID design patterns.

Java JUnit Coverage Build

πŸ“– Read the Design Document β†’ β€” Deep dive into architecture, design decisions, and trade-offs

πŸ“‹ Overview

Developed as part of CS5010: Programming Design Paradigm at Northeastern University (Master's program), this project showcases practical application of object-oriented design principles, Gang of Four patterns, and rigorous testing methodology.

Key Features

  • Multi-Calendar System: Create and manage multiple calendars with unique names and IANA timezones (America/New_York, Europe/Paris, Asia/Kolkata, etc.)
  • Event Management: Single events, all-day events (8am-5pm), and recurring event series
  • Recurring Patterns: Events repeat on specific weekdays (MTWRFSU) for N occurrences or until an end date
  • Three-Tier Editing: Edit single event, event and all future occurrences, or entire series
  • Timezone Support: Full timezone conversion when copying events between calendars
  • Cross-Calendar Copy: Copy single events, all events on a date, or events within a date range
  • Import/Export: CSV and iCal (.ical) format support, Google Calendar compatible
  • Multiple Interfaces: Interactive CLI, Headless mode (script files), and Swing GUI
  • 90%+ Test Coverage: Mutation testing with PIT, JUnit 5, JaCoCo branch coverage

πŸ—οΈ Architecture

graph TD
    User([User]) --> ViewLayer[View Layer]
    ViewLayer --> InterfaceCalendarView[InterfaceCalendarView]
    InterfaceCalendarView --> AbstractCalendarView[AbstractCalendarView]
    AbstractCalendarView --> ConsoleView[ConsoleView]
    AbstractCalendarView --> CalendarGuiView[CalendarGuiView]
    
    ViewLayer -- CalendarFeatures interface --> ControllerLayer[Controller Layer]
    
    ControllerLayer --> CalendarController[CalendarController]
    CalendarController --> MultiCalendarController[MultiCalendarController]
    ControllerLayer --> GuiController[GuiController]
    ControllerLayer --> CommandParser[CommandParser]
    CommandParser --> ExtendedCommandParser[ExtendedCommandParser]
    
    ControllerLayer --> ModelLayer[Model Layer]
    
    ModelLayer --> CalendarManager[CalendarManager Facade]
    CalendarManager --> CalendarWithTimezone[CalendarWithTimezone]
    CalendarWithTimezone --> Calendar[Calendar]
    Calendar --> Events[Events: Simple/Recurring]
Loading

πŸ“ Project Structure

src/
β”œβ”€β”€ main/java/
β”‚   β”œβ”€β”€ controller/
β”‚   β”‚   β”œβ”€β”€ CalendarController.java          # Base CLI controller
β”‚   β”‚   β”œβ”€β”€ MultiCalendarController.java     # Extended multi-calendar support
β”‚   β”‚   β”œβ”€β”€ GuiController.java               # GUI controller (implements CalendarFeatures)
β”‚   β”‚   β”œβ”€β”€ CommandParser.java               # Base command parser
β”‚   β”‚   β”œβ”€β”€ ExtendedCommandParser.java       # Multi-calendar commands
β”‚   β”‚   └── commands/
β”‚   β”‚       β”œβ”€β”€ create/                      # CreateEventCommand, CreateSeriesCommand...
β”‚   β”‚       β”œβ”€β”€ edit/                        # EditEventCommand, EditSeriesCommand...
β”‚   β”‚       β”œβ”€β”€ copy/                        # CopyEventCommand, CopyEventsCommand...
β”‚   β”‚       β”œβ”€β”€ query/                       # PrintEventsCommand, ShowStatusCommand...
β”‚   β”‚       └── utility/                     # HelpCommand, ExitCommand, ExportCommand...
β”‚   β”‚
β”‚   β”œβ”€β”€ model/
β”‚   β”‚   β”œβ”€β”€ calendar/
β”‚   β”‚   β”‚   β”œβ”€β”€ Calendar.java                # Core calendar implementation
β”‚   β”‚   β”‚   └── InterfaceCalendar.java       # Calendar contract
β”‚   β”‚   β”œβ”€β”€ event/
β”‚   β”‚   β”‚   β”œβ”€β”€ SimpleEvent.java             # Single event (Builder pattern)
β”‚   β”‚   β”‚   β”œβ”€β”€ RecurringEvent.java          # Recurring event series
β”‚   β”‚   β”‚   β”œβ”€β”€ InterfaceEvent.java          # Event contract
β”‚   β”‚   β”‚   β”œβ”€β”€ EventStatus.java             # Public/Private enum
β”‚   β”‚   β”‚   └── RecurringType.java           # Daily/Weekly/Custom enum
β”‚   β”‚   β”œβ”€β”€ manager/
β”‚   β”‚   β”‚   β”œβ”€β”€ CalendarManager.java         # Multi-calendar facade
β”‚   β”‚   β”‚   β”œβ”€β”€ CalendarWithTimezone.java    # Calendar-timezone wrapper
β”‚   β”‚   β”‚   └── IcalendarManager.java        # Manager contract
β”‚   β”‚   β”œβ”€β”€ params/
β”‚   β”‚   β”‚   β”œβ”€β”€ EventParams.java             # Parameter object (Builder)
β”‚   β”‚   β”‚   └── RecurringEventParams.java    # Recurring params (Builder)
β”‚   β”‚   └── export/
β”‚   β”‚       β”œβ”€β”€ IExporter.java               # Export strategy interface
β”‚   β”‚       β”œβ”€β”€ CsvExporter.java             # CSV export implementation
β”‚   β”‚       └── IcalExporter.java            # iCal export implementation
β”‚   β”‚
β”‚   └── view/
β”‚       β”œβ”€β”€ InterfaceCalendarView.java       # View contract
β”‚       β”œβ”€β”€ AbstractCalendarView.java        # Shared view logic
β”‚       β”œβ”€β”€ ConsoleView.java                 # Interactive CLI view
β”‚       β”œβ”€β”€ FileView.java                    # Headless file-based view
β”‚       β”œβ”€β”€ CalendarGuiView.java             # Swing GUI implementation
β”‚       β”œβ”€β”€ CalendarFeatures.java            # Controller-View decoupling interface
β”‚       └── dialogs/                         # GUI dialog components
β”‚
β”œβ”€β”€ test/java/
β”‚   β”œβ”€β”€ controller/                          # Controller unit tests
β”‚   β”œβ”€β”€ model/                               # Model unit tests
β”‚   └── view/                                # View unit tests
β”‚
└── resources/
    └── test files, sample calendars

πŸ–ΌοΈ User Interface

Main Application

Full GUI Preview A sleek, professional Swing interface providing a comprehensive overview of your schedule.

Feature Gallery

![Main View](docs/screenshots/gui/calendar-main-view.png)
<!-- slide -->
![Navigation](docs/screenshots/gui/calendar-navigation.png)
<!-- slide -->
![View Events](docs/screenshots/gui/view-events.png)
<!-- slide -->
![General View](docs/screenshots/gui/general-calendar-view.png)

Dialogs & Configuration

![Create Event](docs/screenshots/gui/create-event-dialog.png)
<!-- slide -->
![Recurring Event](docs/screenshots/gui/create-recurring-event.png)
<!-- slide -->
![Recurring (N times)](docs/screenshots/gui/create-recurring-event-for-N-time.png)
<!-- slide -->
![Add Calendar](docs/screenshots/gui/add-new-calendar.png)
<!-- slide -->
![Event Details](docs/screenshots/gui/event-details.png)

πŸš€ Getting Started

Prerequisites

  • Java 17 or higher
  • Gradle 7.0+ (or use included Gradle wrapper)

Build

./gradlew build
./gradlew jar

Run

GUI Mode (Default)

java -jar build/libs/calendar.jar

Interactive Mode (CLI)

java -jar build/libs/calendar.jar --mode interactive

Headless Mode (Script File)

java -jar build/libs/calendar.jar --mode headless res/commands.txt

πŸ“ Command Reference

Calendar Management

create calendar --name Work --timezone America/New_York
use calendar --name Work
edit calendar --name Work --property timezone Europe/London
edit calendar --name Work --property name Office

Event Operations

Single Events

create event "Team Meeting" from 2025-01-10T14:00 to 2025-01-10T15:00
create event "Conference" on 2025-01-15                    # All-day (8am-5pm)
create event "Private Call" from 2025-01-10T10:00 to 2025-01-10T11:00 status private

Recurring Events

# Repeat MWF for 10 occurrences
create event "Standup" from 2025-01-10T09:00 to 2025-01-10T09:30 repeats MWF for 10 times

# Repeat every Thursday until end date
create event "Weekly Review" from 2025-01-10T16:00 to 2025-01-10T17:00 repeats R until 2025-03-31

Three-Tier Editing

# 1. Edit single event
edit event location "Team Meeting" from 2025-01-10T14:00 to 2025-01-10T15:00 with "Room 201"

# 2. Edit this and all future events in series
edit events location "Standup" from 2025-01-15T09:00 with "Zoom Room A"

# 3. Edit entire series (regardless of date)
edit series status "Standup" from 2025-01-10T09:00 with private

Cross-Calendar Copy (with Timezone Conversion)

# Copy single event
copy event "Team Meeting" on 2025-01-10T14:00 --target Personal to 2025-01-15T10:00

# Copy all events on a specific date
copy events on 2025-01-10 --target Personal to 2025-01-20

# Copy events within a range
copy events between 2025-01-01 and 2025-01-31 --target Backup to 2025-02-01

Query & Display

print events on 2025-01-10
print events from 2025-01-01T00:00 to 2025-01-31T23:59
show status on 2025-01-10T14:30                            # Returns: busy or available

Import/Export

export cal work-calendar.csv                               # CSV format (Google Calendar compatible)
export cal work-calendar.ical                              # iCal format

Weekday Codes

Code Day
M Monday
T Tuesday
W Wednesday
R Thursday
F Friday
S Saturday
U Sunday

🎨 Design Patterns

Pattern Implementation Purpose
MVC Model/View/Controller packages Separation of concerns
Command commands/ package Encapsulate operations, enable undo/redo
Builder EventParams, SimpleEvent, RecurringEvent Complex object construction
Strategy IExporter, CsvExporter, IcalExporter Interchangeable export formats
Facade CalendarManager Simplified multi-calendar interface
Template Method getCurrentCalendar() in CommandParser Allow subclass customization
Factory Command creation in parsers Decouple command instantiation

πŸ”§ SOLID Principles Applied

  • Single Responsibility: Each class has one reason to change (e.g., CsvExporter only handles CSV)
  • Open/Closed: Extended via inheritance (MultiCalendarController extends CalendarController)
  • Liskov Substitution: SimpleEvent and RecurringEvent are interchangeable via InterfaceEvent
  • Interface Segregation: Separate interfaces (InterfaceCalendar, InterfaceEvent, IExporter)
  • Dependency Inversion: Controllers depend on InterfaceCalendarView, not concrete implementations

πŸ§ͺ Testing

# Run all tests
./gradlew test

# Generate coverage report
./gradlew jacocoTestReport

# Run PIT mutation testing
./gradlew pitest

Coverage Metrics

  • Branch Coverage: 90%+
  • Mutation Coverage: 90%+
  • Test Strength: High (comprehensive edge case testing)

πŸ“Š Analytics Dashboard

General Calendar View

The dashboard provides event statistics for any date range:

  • Total events count
  • Events by subject
  • Events by weekday distribution
  • Events by week/month
  • Busiest and least busy days
  • Online vs offline event percentages

πŸ”„ Version History

Part Focus Area
Part 1 Core calendar, single events, basic commands
Part 2 Multi-calendar support, timezone conversions, recurring events
Part 3 GUI implementation with Swing, decoupled MVC
Part 4 Analytics dashboard, code review integration

πŸ“š Documentation

Document Description
DESIGN.md Architecture, patterns, and design rationale
CHANGES.md Evolution across development phases
Class Diagrams UML diagrams showing architecture evolution

UML Architecture Evolution

Part 1: Core Architecture Phase 1: Foundation classes for calendar and event management.

Part 2: Multi-Calendar & Timezones Phase 2: Introduction of CalendarManager facade and timezone conversion logic.

Part 3: GUI & Decoupled MVC Phase 3: Swing UI integration with decoupled Feature interface.

🎯 Learning Outcomes Demonstrated

  • Object-Oriented Design: Inheritance hierarchies, interface contracts, encapsulation
  • Design Patterns: Command, Builder, Strategy, Facade, Template Method
  • SOLID Principles: Practical application in real codebase
  • Test-Driven Development: Tests written before implementation
  • Mutation Testing: Verifying test quality beyond line coverage
  • Refactoring: Evolving architecture while maintaining behavior

πŸ‘¨β€πŸ’» Author

Ayush Varma
MS Computer Science, Northeastern University (Expected May 2027)
GitHub | LinkedIn | Portfolio

πŸ“„ License

This project was developed for academic purposes as part of CS5010 at Northeastern University.

About

Multi-calendar management system built with Java, demonstrating MVC architecture, SOLID principles, and 90%+ mutation test coverage

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages