• Post Reply Bookmark Topic Watch Topic
  • New Topic

help with hash maps  RSS feed

 
Shaylen Patel
Greenhorn
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
needed.

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.
 
Tim Cooke
Marshal
Posts: 3873
233
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!