Bank Account Savings Calculator

by jzstagner5 in Circuits > Computers

785 Views, 1 Favorites, 0 Comments

Bank Account Savings Calculator

Intro.PNG

Thank you for choosing my savings calculator. Today we will be learning how to program a BankAccount class to keep track of your own personal expenses and savings. In order to make a bank account to track your expenses you will first need a basic understanding of Java as well as a Java compiler. In this tutorial I will be using Eclipse. (You can use any compiler that you prefer.)

PS- To see the full image of any of the photos just click on them

Create a New Package "Bank" in a Blank Java Project

Create Two New Class’ “BankAccount” and “BankAccountTester”

In “BankAccount” You Will Need to Initiate 3 Private Variables

BA_01_privateIV.PNG

Create a BankAccount Constructor

BA_02_constructor.PNG

Outline 5 Method Headers

Create “public void deposit(double x)”, ”public void withdrawal(double x)”, ”public double average()”, ”public String statement()”, and ”public double balance()”

Program Deposit

BA_03_deposit.PNG

Program Withdrawal

BA_04_withdrawal.PNG

Program Average

BA_05_average.PNG

Program Statement

BA_06_statement.PNG

Program Balance

BA_07_total.PNG

In "BankAccountTester" Program Your Import Statements

BAT_01_import.PNG

Create the Header

BAT_02_top.PNG

Create Welcome Statements

BAT_03_welcome.PNG

Create a While Loop

BAT_04_while.PNG

Create the User Input (Within the While Loop)

BAT_05_userInput.PNG

Create the User Interface (Within the While Loop)

BAT_06_ifStatements1.PNG
BAT_07_ifStatements2.PNG

Create the Closing Statements (Outside the While Loop)

BAT_closingStatements.PNG

Test Your New Code in the Console

If there are any errors in your code, you should try troubleshooting your output statements in the Tester class. Also, make sure that all of your code is in the correct loop/ if statement.

If all is working well then congratulations, you should now have a fully functional BankAccount. Now you can easily keep track of your savings. Thank you and enjoy your new program.