A simple Java console-based application to record, manage, and analyze daily expenses using Object-Oriented Programming, File Handling, and Collections Framework.
Expense Tracker is a lightweight Java console application that helps users manage their daily expenses. It allows users to add expenses, view all recorded expenses, calculate the total expenditure, and generate category-wise summaries.
The application stores expense records locally in a text file, ensuring that data is available even after restarting the program.
This project was developed to strengthen Core Java concepts including Object-Oriented Programming, Collections Framework, File Handling, Exception Handling, and Java Time API.
- Add a new expense
- Category validation
- Positive amount validation
- Automatically stores the current date
Displays all recorded expenses in a tabular format including:
- Category
- Amount
- Date
Calculates the total amount spent across all recorded expenses.
Displays total expenses grouped by category using Java HashMap.
Example:
Food : 1200.00
Travel : 850.00
Shopping : 1500.00
- Saves all expenses into
expenses.txt - Automatically loads existing expenses when the application starts
- Prevents empty categories
- Prevents invalid numeric input
- Prevents negative or zero expense amounts
- Handles invalid menu choices gracefully
- Java
- Object-Oriented Programming (OOP)
- Collections Framework
- ArrayList
- HashMap
- File Handling
- Exception Handling
- Java Time API (
LocalDate) - BufferedReader / BufferedWriter
Expense-Tracker
│
├── src
│ └── com
│ └── expensetracker
│ ├── Expense.java
│ └── ExpenseTracker.java
│
├── expenses.txt
├── README.md
└── expense-tracker.png
git clone https://github.com/Jahnavi-Avadhuta/Expense-Tracker.gitImport the project into Eclipse, IntelliJ IDEA, or VS Code.
javac Expense.java ExpenseTracker.javajava com.expensetracker.ExpenseTracker===== Expense Tracker Application =====
1. Add Expense
2. View All Expenses
3. View Total Expense
4. View Category-wise Total
5. Save & Exit
A project banner is included above.
Future versions will include console screenshots and GIF demonstrations.
- Edit existing expenses
- Delete expenses
- Monthly reports
- Budget planning
- Expense filtering by date
- Export to CSV
- Charts and visual analytics
- GUI version using JavaFX or Swing
- Database integration using MySQL
- User authentication
This project helped strengthen my understanding of:
- Object-Oriented Programming
- Collections Framework
- File Handling
- Exception Handling
- Java Time API
- Data Persistence
- Console Application Development
- Clean Code Practices
Jahnavi Avadhuta
Computer Science Graduate
Software Engineer | Java | Spring Boot | Python | AI & Data Science Enthusiast
🌐 Portfolio: YOUR_PORTFOLIO_URL
💼 LinkedIn: YOUR_LINKEDIN_URL
💻 GitHub: https://github.com/Jahnavi-Avadhuta
If you found this project useful, consider giving it a ⭐ on GitHub.
This project was developed for educational and learning purposes.