How parthgandhinus/tp works
Project Type and Purpose
• This is a single‐module, command‐line Java application (an open‐source CLI student classification tool), built with Gradle.
• It implements a command‐pattern architecture to let users add, edit, list, archive, and view students stored in a text file.
a. User Interface Layer
• DataUI / UI classes (src/main/java/classify/ui)
• Responsible for I/O with console, invoking the command‐framework.
b. Input Parsing Layer
• UserInput, InputParsing, and exception classes (src/main/java/classify/user)
• Validates and transforms raw strings into structured arguments.
c. Command Layer
• Commands interface and implementations (src/main/java/classify/commands)
• Follows the Command pattern; each command encapsulates an action (AddStudent, EditStudent, ArchiveCommands, etc.).
d. Data Layer
• DataHandler/DataReader/DataWriter (src/main/java/classify/data)
• Coordinates reading from and writing to persistent storage.
e. Domain Model
• Student, StudentAttributes, StudentList, SubjectGrade, Details (src/main/java/classify/student)
• Represents business entities, with sorting/comparator utilities.
f. Text File I/O
• TextFileHandler/Parser/Reader (src/main/java/classify/textfilecode)
• Implements low‐level parsing and formatting of the .txt data store.
g. Persistence (the text file “database”)
• A flat text file in the working directory, manipulated by TextFileHandler.
• UI → InputParsing: user’s raw input
• InputParsing → CommandFactory/Commands: dispatches to specific Command object
• Command → Domain Model (StudentList): reads or mutates in‐memory list
• Command → DataHandler → DataReader/TextFileParser → Persistence
(for load operations)
• Command → DataHandler → DataWriter/TextFileHandler → Persistence
(for save operations)
• Results → UI: formatted output to console
Architectural Patterns & Principles
• Command Pattern (commands folder): decouples user actions from execution logic.
• Single Responsibility (each package—ui, user, commands, data, student—has a clear role).
• Layered Architecture: UI → parsing → command → data → persistence.
• Dependency Injection (simple: higher layers instantiate lower‐level handlers).
Technologies & Frameworks
• Java 11
• Gradle build automation (build.gradle, gradlew wrapper)
• Checkstyle for code style (config/checkstyle)
• JUnit for testing (src/test)
• GitHub Actions for CI (.github/workflows/gradle.yml)