This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

help with hash maps  RSS feed

 
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.
 
Marshal
Posts: 4463
284
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!