• Post Reply Bookmark Topic Watch Topic
  • New Topic

Simple AT: transactions not visible  RSS feed

 
William Nyqvister
Greenhorn
Posts: 7
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey people! I got a issue with my code.. Everything is fine about it, only the transactions doesn't show. I have tried a bunch of stuff, but can't seem to get it right.



Does anyone see the problem? '
 
Paweł Baczyński
Bartender
Posts: 2054
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One of the problems you have way too much logic inside your main method.
Other problem is you pass everything around static method. It is not how you are supposed to write OO code.
Third problem is each of those methods is public. Only declare public what needs to be public.
 
Scott Bee
Greenhorn
Posts: 16
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Nyqvister wrote:Does anyone see the problem? '


Ditto to Pawel's advice.

The problem appears to be the makeTransactions calls in lines 30 and 46. No matter what is input, the amount variable contains 0. That is, the net change amount of each transaction isn't being passed, so it isn't stored in the trans array.

Good luck!

Scott
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!