Skip to content

About

A simple Java-Based Expense Tracker application that allows users to add, view, and manage their daily expenses. The project uses file handling to store data and features a clean menu-driven interface.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

  • ExpenseTracker

  • A simple Java-Based Expense Tracker application that allows users to add, view, and manage their daily expenses. The project uses file handling to store data and features a clean menu-driven interface.
  • A simple Java console-based Expense Tracker that lets you add incomes and expenses, view a summary, and track savings with a 30% spending limit rule.

  • Features

    1. Add income with description and amount.
    1. Add expense with description and amount.
    1. Automatically calculate total income, total expense, and current balance.
    1. Enforces a 30% savings rule using a spending limit based on total income.
    1. Prevents spending if it would make the balance negative or cross the savings limit.
    1. Saves data (income, expense, balance) to a local file and loads it on the next run.
  • Tech Stack

    1. Language: Java
    2. Type: Console/CLI application
    3. Storage: Local text file (data.txt) for persistence.
  • Project Structure

    1. Main.java – Entry point; shows the menu and handles user input via Scanner.​
    1. ExpenseTracker.java – Core logic for adding income/expense, showing summary, savings info, and saving/loading data.​
    1. Savings.java – Manages balance and 30% spending limit checks.​
    1. Income.java – Simple model class for income entries.​
    1. Expense.java – Simple model class for expense entries.
  • How to Run

    1. Make sure you have Java (JDK 8+) installed.
    1. Place all .java files in the same package/directory (for example, expenseapp/).​
    1. Compile the files: javac expenseapp/*.java
  • Run the app: java expenseapp.Main

Use the menu in the terminal: Option 1: Add Income Option 2: Add Expense Option 3: View Summary (total income, total expense, balance) Option 4: View Savings Info (current balance and 30% spending limit) Option 5: Save data and exit

Data Persistence

  1. The app saves data to data.txt in the working directory when you exit using option 5.​

  2. On startup, it tries to load previous income, expense, and balance data; if not found, it starts fresh.

    Future Improvements

  3. Add support for listing all individual income and expense entries.

  4. Add categories for expenses (food, travel, rent, etc.).

  5. Add date and time stamps to each transaction.

  6. Improve input validation and error handling.

About

A simple Java-Based Expense Tracker application that allows users to add, view, and manage their daily expenses. The project uses file handling to store data and features a clean menu-driven interface.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors