Coder Social home page Coder Social logo

josephc45 / budget_calculator Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 397 KB

Budget calculator w/GUI to help keep track of spending and allocation of money on a monthly basis.

Java 100.00%
java swing-gui jfreechart-library tinylog budget-calculator

budget_calculator's Introduction

Budget Calculator w/GUI

A simple budget calculator used for budgeting, and tracking spending.

The program takes a given monthly income (which you have to set in the Ops class) and the ratio of your income you wish to allocate towards:

Examples:
    Expenses : Rent, Spotify, Groceries, Phone, Internet...
    Savings : PC savings, general savings...
    Investments : Apple, GameStop, Tesla...
    Reserve (Emergencies) : Car, Medical...
  • By default the income is set to 5K a month with:
    • Expenses : 50%
    • Savings : 40%
    • Investment : 5%
    • Emergency Reserve: 5%

View the code from the MonthlyBudgetRatio() method below:

	BigDecimal monthlyIncome = BigDecimal.valueOf(5000.00);
	BigDecimal ratioOfMonthlyIncomeForExpenses = BigDecimal.valueOf(0.50);
	BigDecimal ratioOfMonthlyIncomeForSavings = BigDecimal.valueOf(0.40);
	BigDecimal ratioOfMonthlyIncomeForInvestmentAndEmergencies = BigDecimal.valueOf(0.05);
	
	monthlyExpenseGoal = monthlyIncome.multiply(ratioOfMonthlyIncomeForExpenses).setScale(2, RoundingMode.CEILING);
	monthlySavingsGoal = monthlyIncome.multiply(ratioOfMonthlyIncomeForSavings).setScale(2, RoundingMode.CEILING);
	monthlyInvestmentGoal = monthlyIncome.multiply(ratioOfMonthlyIncomeForInvestmentAndEmergencies).setScale(2, RoundingMode.CEILING);
	monthlyEmergencyReserveGoal = monthlyIncome.multiply(ratioOfMonthlyIncomeForInvestmentAndEmergencies).setScale(2, RoundingMode.CEILING);

The process:

  1. You create a txt file where you will create a entry with a transaction choice of:

    • E : Expense
    • S : Savings
    • I : Investment
    • R : Reserve (Emergency)
  2. In the transaction text box a user would insert a 'transaction' such as:

    E,AmazonShopping,10.00,1/4/2020

  3. Then specify the path to the txt file where you have written the transactions down using the 'Choose File' button.

  4. After you are satisfied with the amount of transactions you have input into your txt file, then you are ready to click the 'Calculate Budget' button.

  5. Once the button has been pressed, a report will be generated (in the users home folder) along with a bar graph and a line chart.

    • The Bar Graph
      • Displays two groupings of bars, one dedicated to your monthly spending goal, and the other would be your actual spending that you documented.
    • The Line Chart
      • Displays your Expense spending trend over the duration you were reporting for.

You also have the ability to save the bar graph and the line chart to separate png's through the 'File' menubar.

budget_calculator's People

Contributors

josephc45 avatar

Watchers

 avatar

budget_calculator's Issues

Add manual to project

I have the manual created. I just have to add it to the project and get its path.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.