• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

help with hash maps

Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 5555
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic