Solved

Help with Java program

Posted on 2011-02-17
3
416 Views
Last Modified: 2012-05-11
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
Comment
Question by:Kody-Burg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
ID: 34922804
In your constructor
  public BankAccount ( double newBalance , double interestRate )
        {
            balance = newBalance;
        }
you don't assign interestRate
0
 
LVL 47

Expert Comment

by:for_yan
ID: 34922817

You need to do something like that:
  public BankAccount ( double newBalance , double interestRate )
        {
            balance = newBalance;
          this.interestRate = interestRate;
        }
0
 
LVL 6

Author Closing Comment

by:Kody-Burg
ID: 34922852
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Simple Linear Regression

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question