https://roadmap.sh/projects/expense-tracker
# Expense Tracker
## Overview
The Expense Tracker is a Java application designed to help users manage their expenses. It allows users to add, update, delete, and view expenses, as well as view summaries of expenses for specific months.
## Features
- Add new expenses with date, description, amount, and category.
- Update existing expenses.
- Delete expenses.
- View all expenses.
- View a summary of all expenses.
- View a summary of expenses for a specific month.
- Save and load expenses from a file.
## Project Structure
Expense_Tracker/ ├── Expense.java ├── ExpenseStorage.java └── ExpenseTracker.java
## Classes
### Expense
Represents an individual expense with the following attributes:
- `date`: The date of the expense.
- `description`: A brief description of the expense.
- `amount`: The amount spent.
- `category`: The category of the expense.
### ExpenseStorage
Handles saving and loading expenses to and from a file.
- `saveExpenses(ArrayList<Expense> expenses)`: Saves the list of expenses to a file.
- `loadExpenses()`: Loads the list of expenses from a file.
### ExpenseTracker
The main class that provides a menu-driven interface for managing expenses.
- `main(String[] args)`: The entry point of the application.
- `addExpense(Scanner scanner, ArrayList<Expense> expenses)`: Adds a new expense.
- `updateExpense(Scanner scanner, ArrayList<Expense> expenses)`: Updates an existing expense.
- `deleteExpense(Scanner scanner, ArrayList<Expense> expenses)`: Deletes an expense.
- `viewAllExpenses(ArrayList<Expense> expenses)`: Displays all expenses.
- `viewSummary(ArrayList<Expense> expenses)`: Displays a summary of all expenses.
- `viewMonthlySummary(Scanner scanner, ArrayList<Expense> expenses)`: Displays a summary of expenses for a specific month.
## Usage
1. Compile the Java files:
```bash
javac Expense_Tracker/*.java
- Run the application:
java Expense_Tracker.ExpenseTracker
- Java Development Kit (JDK) 8 or higher.
This project is licensed under the MIT License.
- [lakshay1341]