A simple and modular Java-based command-line application that helps users track income, manage expenses, and monitor monthly category limits. Designed with object-oriented principles and robust testing support.
- Add income with source and timestamp
- Add expenses with categories and payment methods (with automatic fee calculation)
- Manage budget categories with monthly limits
- View financial summaries, net earnings, and filter transactions
- Track expenses over time ranges
- Detect and alert when a category exceeds its budget limit
- Auto-reset categories when a new month begins
- Full JUnit 5 test coverage + JaCoCo support
- Java 17 or later
- Maven 3.6+ (if using
pom.xml) - JUnit 5 (included via Maven or IDE)
Clone the repository:
git clone https://github.com/yourusername/budget-manager.git
cd budget-managerCompile the project:
javac *.javaOr if using Maven:
mvn compileTo launch the command-line interface:
java BudgetCLIThen follow on-screen prompts such as:
> add income
> add expense
> list transactions
> net earnings
Use help to see all supported commands.
Run unit tests with:
mvn testTo generate test coverage report using JaCoCo:
mvn jacoco:reportThen open:
target/site/jacoco/index.html
You’ll find a complete line-by-line breakdown of which classes and methods were tested.
TransactionTest– Ensures abstract and shared logic worksIncomeTest,ExpenseTest– Validate subclass behavior and fee handlingBudgetManagerTest– Confirms transaction addition, filtering, earnings calculationBudgetCategoryTest– Tests limits, resets, and expense accumulationMonthlyLimitExceededExceptionTest– Verifies error informationEdgeCaseTest– Includes extreme values, invalid inputs, and logic boundaries
- Java 17
- JUnit 5
- JaCoCo (Test Coverage)
- Maven (optional build support)