Skip to content
Satyam edited this page Nov 26, 2025 · 4 revisions

This simulates the Jeopardy Game in Java

Design Patterns Used:

The Observer Pattern (Behavioral Pattern) was chosen since it is best suited for establishing one-to-many dependencies between objects. It was utilized to automatically notify and update multiple objects based on certain changes or choices made by one object which ensured timely notifications and can synchronize actions accordingly. Observer Pattern: Used for GameEventLogPublisher, GameObserver, OutputEventLogger, and CsvEventLogger

The Command Pattern (Behavioral Pattern) was chosen since it encapsulates requests as objects, allowing for queuing of requests as well as logging of requests. Command Pattern: Used as Action interface with ChooseQuestionAction, AnswerQuestionAction and CheckQuestionAction.

The Strategy Pattern (Behavioral Pattern) was used since one object's behavior needed to be altered at runtime by sub-objects (or its subclasses). It also adhered to the SOLID principles namely Open/Closed Principle and Single Responsibility Principle. Strategy Pattern: Used FileFormatStrategy interface with CsvFormatStrategy, JsonFormatStrategy and XmlFormatStrategy

Careful attention was paid to adhere to SOLID principles when deciding and utilizing the design patterns.

Implementation details are listed in the README file under the code section.

Testing was done to ensure the players were initialized correctly and accurately without any incorrect data, players' score cannot be negative, the questions were initialized with the correct, respective information and the event log was tracking progress properly.

AI was utilized to understand how to load data from the different file types : csv, xml and json. On typing code into VSCode, the predictive text feature (IntelliSense) automatically generated code snippets, some of which were kept, altered or not used altogether.

Class Diagram COMP 3607 Project.drawio-1.pdf

Clone this wiki locally