• Post Reply Bookmark Topic Watch Topic
  • New Topic

HashMap  RSS feed

 
Kristina Hawkins
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I need you help here please! I have a code below and I don't what to do with these two methods:



and this is the Bank class:



any help/tips will be really appreciated!!
 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't what to do with these two methods:

Can you explain a bit what the problem is? 
What are the names of the methods?  The posted code has lots of methods in it.
Why are they in the code if you don't know ...?
 
Kristina Hawkins
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In the BankReport class there is two methods - displayInactiveAccounts and displayTotal - so those methods basically have to display a blunt that are inactive and display balance of all the accounts in the bank, but I don't know how to do it as I don't have access to any other classes
 
Kristina Hawkins
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Accounts *
 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
two methods - displayInactiveAccounts and displayTotal 

Ok, what do you think each of those methods should do?
Are there other display... method that can be examined to see what is expected?


  don't have access to any other classes

Not much anyone here can do.  You will have to talk to your instructor to see how to get access to the missing classes.

Where is the displayInactiveAccounts method?  I can not find it in the code.
Also the displayTotal method???
 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another thing: you have public set and get methods for your Map field. That means any other code can change the state of your bank without you knowing about it. There is a potential solution: taking defensive copies, but it I think it would be better not to have those two methods at all. If you were instructed to write those methods, please query it with your teachers.
 
Knute Snortum
Sheriff
Posts: 4287
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This isn't going to work.  You can't have a method inside a method.  You're missing a closing brace (}).
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!