Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

help with hash maps  RSS feed

Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I need to implement these methods, how would i do so?

Create an account: Verify that username provided does not already exist.
Both username and password must be provided, and stored in the hashmap

Login to existing account has two possible errors: Username not found and
Incorrect password. If valid username/password pair is given, give a
Congratulations message.

Changing a password requires a correct username and current password to
be entered. If valid, prompt for a new password, and update the hashmap
with that value. Give Username not found and Incorrect password errors, as

In order to remove an account, the user must enter a valid
username/password pair. If not, give appropriate error messages.

Listing all accounts, list both the username and password (yes, this is not
normal, but you need to be able to access both key and value). If the
password hash is empty, give an appropriate error messages.
Posts: 4410
Clojure IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Shaylen,

This looks like homework to me. Is it? We strongly encourage folks to DoYourOwnHomework as this is the only way you are going to learn anything. We are NotACodeMill so nobody is going to just hand you over a solution.

I suggest that you attempt to get at least part of your problem working. If you run into trouble then come back, show us what you've done so far, and show us what the specific issue is you are facing. You will certainly get more help that way.
We don't have time for this. We've gotta save the moon! Or check this out:
Rocket Oven Kickstarter - from the trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!