permaculture playing cards
The moose likes Beginning Java and the fly likes Need help with username and password validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Need help with username and password validation" Watch "Need help with username and password validation" New topic

Need help with username and password validation

Sid Husawn

Joined: Jul 12, 2011
Posts: 1
Hey everyone. I was instructed to create an bank account program that mimics an atm. New users get added to a customers.txt file and I have to validate usernames and passwords from that same file. This is what I have so far.

Thanks any help appreciated
Rahul Sudip Bose
Ranch Hand

Joined: Jan 21, 2011
Posts: 637

It is very difficult to read and fully understand so much code that has no description. Please describe it in detail - tell what the classes do, basic logic of methods etc. It will make analysis easy.

SCJP 6. Learning more now.
Greg Brannon

Joined: Oct 24, 2010
Posts: 563
And describe what you need help with. What's not working? If you're getting error messages, post them exactly (cut and paste). If the code is not functioning as you'd like, post examples of what you want it to do and actual results from running the code that show how it does not agree with your specification, cut and past if possible.

Since the assignment requires a file of customer usernames and passwords, you need to define the format of the customer.txt file and then read it into a collection of some kind. Then, when a returning ATM user enters their username and password, the customer collection can be searched for an existing username and corresponding password to validate the user's logon. If a new customer, the new ussername and password will be added to the customer collection. The customer.txt file can be updated, written from the customer collection, after each customer logoff or before the ATM shuts down.

Always learning Java, currently using Eclipse on Fedora.
Linux user#: 501795
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1341

Hi Sid

Welcome to JavaRanch !!!

Just mention what errors you are getting in your application. Then only fellow members of this forum may help you in removing those errors.

~ abhay

Oracle certified Java 8 Programmer I (1Z0-808), Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I, CIW Certified Ecommerce specialist
I agree. Here's the link:
subject: Need help with username and password validation
It's not a secret anymore!