• Post Reply Bookmark Topic Watch Topic
  • New Topic

Bank Account Class  RSS feed

 
Jason Delgado
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys. I am creating a bank account class however my code for my monthlyProcess method is wrong when I try to call the calcInterest method.
Here is the code:

Can someone tell me where I'm going wrong?
 
Arthur Vinicius Rebelo
Ranch Hand
Posts: 30
1
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your call for calcInterest() method in the monthlyProcess() is wrong. There is no argument passed to calcInterest() whereas the method requires a double value as argument. Try passing a double argument which in your case is the rate you want.
See more here
 
Jason Delgado
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Arthur, but i don't know what the rate is. The user is supposed to specify. Maybe I should just declare rate = 0.0?
 
Arthur Vinicius Rebelo
Ranch Hand
Posts: 30
1
Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe I should just declare rate = 0.0?

If you just want to see if your code runs, yeah.

To get a user specified value try this:

 
Arthur Vinicius Rebelo
Ranch Hand
Posts: 30
1
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch btw
 
Jason Delgado
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!