Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 419
  • Last Modified:

Help with Java program

Hello everyone,

I am learning how to program in Java, and need some help with a program I am writing. The program is titled BankAccount. It is accessed and receives input from BankAccountUser. I have the entire thing working, except for the interest part. If you could please download my source code and take a look, you will see what I mean. The program does not add the interest like I am asking it too.

I'm probably missing something simple, but I need help finding what it is.

Thank you in advance!

Kody

Here is the file that contains the methods that make it work:

BankAccount.java

Here is the file that contains the main method that accepts user input:

BankAccountUser.java
0
Kody-Burg
Asked:
Kody-Burg
  • 2
1 Solution
 
for_yanCommented:
In your constructor
  public BankAccount ( double newBalance , double interestRate )
        {
            balance = newBalance;
        }
you don't assign interestRate
0
 
for_yanCommented:

You need to do something like that:
  public BankAccount ( double newBalance , double interestRate )
        {
            balance = newBalance;
          this.interestRate = interestRate;
        }
0
 
Kody-BurgAuthor Commented:
Wow. DUH! I can't believe I missed something that simple. Guess I just needed a second set of eyes to look at it for me.

Thank you! :-)
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now