Skip to content

Commit 2135b6b

Browse files
Add LICENSE and enhance README with professional formatting, badges, and comprehensive documentation
1 parent c6b037f commit 2135b6b

2 files changed

Lines changed: 113 additions & 13 deletions

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Maxwell Hauser
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 92 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,105 @@
11
# File Statistics Processor
22

3-
Simple Swing-based utility that reads a text file containing an integer count followed by that many integer values, echoes the values to an output file with 10 numbers per line, and appends statistics (minimum, maximum, total, average).
3+
![Java](https://img.shields.io/badge/Java-21-ED8B00?style=flat&logo=openjdk&logoColor=white)
4+
![Maven](https://img.shields.io/badge/Maven-3.9+-C71A36?style=flat&logo=apache-maven)
5+
![License](https://img.shields.io/badge/License-MIT-blue?style=flat)
6+
![Status](https://img.shields.io/badge/Status-Active-success?style=flat)
47

5-
- Input format: first integer = file size (count of following integers)
6-
- Output format: first line repeats file size, next lines = values (10 per line), followed by min, max, total, average (one per line)
7-
- UI: uses dialogs to choose input and output files; shows a summary when done
8+
A Swing-based Java utility that processes integer data files, reformats the output, and calculates comprehensive statistics including minimum, maximum, total, and average values.
89

9-
## Quick Start
10+
## ✨ Features
11+
12+
- **File Processing**: Read and validate integer data files
13+
- **Formatted Output**: Write data with 10 numbers per line
14+
- **Statistical Analysis**: Calculate min, max, total, and average
15+
- **Input Validation**: Verify data count and format integrity
16+
- **GUI Interface**: User-friendly file selection dialogs
17+
- **Sample Data**: Includes multiple test files (10-700 integers)
18+
19+
## 📁 Input Format
20+
21+
- First integer: count of following integers
22+
- Subsequent integers: data values (space or newline separated)
23+
24+
## 📄 Output Format
25+
26+
- Line 1: File size (count)
27+
- Lines 2-n: Data values (10 per line)
28+
- Final lines: Statistics (one per line)
29+
- Minimum value
30+
- Maximum value
31+
- Total sum
32+
- Average (2 decimal places)
33+
34+
## 🚀 Quick Start
35+
36+
### Using Maven (Recommended)
1037

1138
```powershell
12-
Push-Location "g:\My Drive\GITHUB\java\java_file_statistics_processor_gh"
39+
# Build the project
40+
mvn clean package
41+
42+
# Run the application
43+
java -jar target/file-statistics-processor-1.0.0.jar
44+
```
45+
46+
### Without Maven
47+
48+
```powershell
49+
# Compile
1350
javac FileStatisticsProcessor.java
51+
52+
# Run
1453
java FileStatisticsProcessor
15-
Pop-Location
1654
```
1755

18-
## Sample Data
56+
## 📖 Usage
57+
58+
1. Launch the application
59+
2. Select an input file (sample files available in `data/` directory)
60+
3. Choose output location and filename
61+
4. View processing summary dialog
62+
5. Check output file for formatted data and statistics
63+
64+
## 📊 Sample Data
65+
66+
The `data/` directory includes test files:
67+
- `Data - 10.txt` (10 integers)
68+
- `Data - 20.txt` (20 integers)
69+
- `Data - 50.txt` (50 integers)
70+
- `Data - 100.txt` (100 integers)
71+
- `Data - 200.txt` (200 integers)
72+
- `Data - 400.txt` (400 integers)
73+
- `Data - 600.txt` (600 integers)
74+
- `Data - 700.txt` (700 integers)
75+
76+
## 📋 Requirements
77+
78+
- **JDK 21** (Temurin recommended)
79+
- **Maven 3.9+**
80+
81+
## 🏗️ Building from Source
82+
83+
```powershell
84+
# Clone the repository
85+
git clone https://github.com/maxwell-hauser/java_file_statistics_processor.git
86+
cd java_file_statistics_processor
87+
88+
# Build with Maven
89+
mvn clean install
90+
91+
# Run tests
92+
mvn test
93+
```
94+
95+
## 📄 License
96+
97+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
98+
99+
## 👤 Author
19100

20-
Example files are in `data/`. Choose any of the `Data - *.txt` files as input. The output can be saved anywhere; if no extension is provided, `.txt` is appended automatically.
101+
**Maxwell Hauser**
21102

22-
## Notes
103+
## 🤝 Contributing
23104

24-
- The program validates the declared file size and reads exactly that many integers.
25-
- Non-integer tokens or insufficient values will show an error dialog.
26-
- Average is written with two decimal places.
105+
Contributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/maxwell-hauser/java_file_statistics_processor/issues).

0 commit comments

Comments
 (0)