How rapphy243/catching-plagiarists works
The “Catching Plagiarists” project is a standalone Java application (designed to be used within BlueJ) that implements a solution to the “catching plagiarists” problem. It uses a terminal-based GUI to allow the user to select essays and then detect similarities between essay pairs. In short, the project performs file-based text analysis by reading essays _in situ_ from directories (“Large number of documents”, “Medium number of documents”, “Small number of documents”) and then processing them using several core model classes.
Main Components
• User Interface (UI): Represented by CatchingPlagiaristsGUI.java. This is the entry point for the user, handling input and displaying output through a terminal GUI.
• Controller / Orchestration Layer: Although the project is not a full-blown MVC framework, other classes like Parsing.java and Directories.java act as controllers or managers. They handle file system interactions and text parsing.
• Domain Models: The core data model classes include Essay.java, EssayPair.java, EssayGroup.java, and EssayGroupSet.java. These classes encapsulate essay data, represent pairs of essays for comparison, and group essays based on detected similarities.
• Document Repository: The directories “Large number of documents”, “Medium number of documents”, and “Small number of documents” serve as the source for input essays.
• Utility / Config Files: Files such as Directories.java (for file management), Parsing.java (for processing the texts), and even package.bluej (for BlueJ project configurations) support the main functions.
Relationships and Component Interactions
• The UI (CatchingPlagiaristsGUI.java) acts as the front end. It sends user commands to the controller layer.
• The controller (via Parsing.java and Directories.java) reads files from the document directories and creates Essay objects.
• The domain model takes these Essay objects and, through EssayPair and EssayGroup classes, performs the plagiarism detection by comparing essays.
• Data flows from the file system (document directories) into the model layer via file reading and parsing logic, then flows back to the UI as the output of analysis.
• Optionally, indicate that the testing class (EssayGroupTester.java) interacts with the core logic to verify correctness.
Architectural Patterns and Design Principles
• Model-View Separation: Although not a strict MVC framework, the responsibilities are clearly divided between the UI (view), processing logic (controller), and data models (model).
• Modularity: Each Java class is responsible for a specific piece of functionality (essay representation, file parsing, grouping, etc.), demonstrating good separation of concerns.
• File-Driven Workflow: The design incorporates direct file system access from multiple directories, which should be clearly depicted.
Relevant Technologies
• Java (primarily standard libraries for file I/O and terminal GUI)
• BlueJ (as the development environment specified in the README)
• Text file parsing (for the essay text files, with .shtml.txt extensions)