This is a simple Java application that calculates the final balance of a savings account after a given number of years, based on an initial deposit and an annual interest rate. The application uses a graphical user interface (GUI) built with Swing.
- Input fields for the initial deposit, annual interest rate, and number of years.
- A button to calculate the new balance.
- Displays the calculated balance.
- Java Development Kit (JDK) 8 or higher
-
Clone the repository:
git clone https://github.com/Mark-Langston/Interest_Balance_Calculator.git cd Interest_Balance_Calculator
-
Compile the Java files:
javac Main.java
-
Run the application:
java Main
The Main
class creates and displays the GUI. It includes:
- Labels and text fields for the initial deposit, annual interest rate, and number of years.
- A button to trigger the calculation.
- Labels to display the final balance.
The BankAccount
class handles the calculation of the final balance based on the provided initial deposit, annual interest rate, and number of years.
- Enter the initial deposit amount in the "Initial Deposit" field.
- Enter the annual interest rate (in percentage) in the "Annual Interest Rate" field.
- Enter the number of years in the "Number of Years" field.
- Click the "Calculate New Balance" button.
- The calculated balance will be displayed.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes.
- Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.