File Statistics Processor

A Swing-based Java utility that processes integer data files, reformats the output, and calculates comprehensive statistics including minimum, maximum, total, and average values.
- File Processing: Read and validate integer data files
- Formatted Output: Write data with 10 numbers per line
- Statistical Analysis: Calculate min, max, total, and average
- Input Validation: Verify data count and format integrity
- GUI Interface: User-friendly file selection dialogs
- Sample Data: Includes multiple test files (10-700 integers)
- First integer: count of following integers
- Subsequent integers: data values (space or newline separated)
- Line 1: File size (count)
- Lines 2-n: Data values (10 per line)
- Final lines: Statistics (one per line)
- Minimum value
- Maximum value
- Total sum
- Average (2 decimal places)
Using Maven (Recommended)
# Build the project
mvn clean package
# Run the application
java -jar target/file-statistics-processor-1.0.0.jar
# Compile
javac FileStatisticsProcessor.java
# Run
java FileStatisticsProcessor
- Launch the application
- Select an input file (sample files available in data/ directory)
- Choose output location and filename
- View processing summary dialog
- Check output file for formatted data and statistics
The data/ directory includes test files:
- Data - 10.txt (10 integers)
- Data - 20.txt (20 integers)
- Data - 50.txt (50 integers)
- Data - 100.txt (100 integers)
- Data - 200.txt (200 integers)
- Data - 400.txt (400 integers)
- Data - 600.txt (600 integers)
- Data - 700.txt (700 integers)
- JDK 21 (Temurin recommended)
- Maven 3.9+
# Clone the repository
git clone https://github.com/maxwell-hauser/java_file_statistics_processor.git
cd java_file_statistics_processor
# Build with Maven
mvn clean install
# Run tests
mvn test
This project is licensed under the MIT License - see the LICENSE file for details.
Maxwell Hauser
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.