?
Solved

Help with Java program

Posted on 2011-02-17
3
Medium Priority
?
417 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 2000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Starting up a Project
Suggested Courses
Course of the Month10 days, 8 hours left to enroll

765 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