A lightweight Java application for managing employee data and generating salary reports. The tool provides employee record management with data validation and CSV report generation capabilities.
- Features
- Requirements
- Installation
- Usage
- Demo
- Architecture
- API Documentation
- Contributing
- Testing
- License
- Citation
- Acknowledgments
- Employee record management with validation
- Custom exception handling for numerical inputs
- Automated CSV report generation
- Interactive command-line interface
- Data validation and sanitization
- Configurable salary calculation
- Java Development Kit (JDK) 8 or later
- Java Runtime Environment (JRE)
- Terminal or Command Prompt
- 256MB RAM minimum
- 10MB disk space
# Clone the repository
git clone https://github.com/nabilshadman/java-api-employee-reporting-tool.git
# Navigate to project directory
cd java-api-employee-reporting-tool
# Compile the project
javac EmployeeReport/src/*.java -d EmployeeReport/bin
# Run the application
java -cp EmployeeReport/bin Driver
How many employees are there? Please enter a number: 2
Please enter employee 1's data below.
Name: John
Hourly salary (number): 20.5
Hours worked (number): 40
Please enter employee 2's data below.
Name: Jane
Hourly salary (number): 25.0
Hours worked (number): 35
The application generates salary_report_employee.csv
with the following format:
Employee Name,Salary,Hours,Weekly Pay
John,20.50,40,820.00
Jane,25.00,35,875.00
Here's a visual demonstration of the application in action:
1. Interactive CLI collecting employee data |
2. Generated CSV salary report output |
The tool features:
- User-friendly command-line interface for data entry
- Input validation for numerical values
- Automated CSV report generation with formatted salary calculations
The project follows a modular architecture with three main components:
Employee.java
: Core data model and business logicDriver.java
: Main application entry point and UIInvalidNumberException.java
: Custom exception handling
JavaDoc documentation is available in the /EmployeeReport/doc
directory. Key classes:
public class Employee {
public Employee(String name, double hourlySalary, int hoursWorked)
public static void printSalaryReport(ArrayList<Employee> employees)
}
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit changes (
git commit -m 'Add AmazingFeature'
) - Push to branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
# Run test suite
java -cp EmployeeReport/bin Test
This project is licensed under the MIT License - see the LICENSE file for details.
If you use this project in your research, please cite it as:
@software{java-api-employee-reporting,
author = {Shadman, Nabil},
title = {Employee Reporting Tool - Java API},
year = {2020},
publisher = {GitHub},
url = {https://github.com/nabilshadman/java-api-employee-reporting-tool}
}
- OpenJDK community for Java development tools
- Contributors and maintainers