Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Help with Java program

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

610 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