My teacher just gave us an ATM assignment and today was our 4 week of programming , our teacher hasnt taught us about file linking or stuff , i wanted to ask that the problem which il be having is that my teacher told us that .
"When your program starts, it should be displaying a login screen. User will be asked to enter a login and 5 digit pin code. The system verifies the login and pin and displays an error if it is incorrect
You have to create a array that holds the username and password
Enter login: example
Enter Pin code: 12345 "
I dont know how how will i save the data of a user :$ , when it will ask login or stuff ? how can it be done ? storing data in a text file and then accessing it , please help me out with that part
ATM assignment
Started by ahmed, Nov 08 2008 03:02 AM
5 replies to this topic
#1
Posted 08 November 2008 - 03:02 AM
|
|
|
#2
Posted 08 November 2008 - 07:51 AM
Does it require you to save details? What are the specification of the program?
#3
Posted 08 November 2008 - 08:50 AM
Check the attachment , I just need help on how to store login name and pin code, Rest I am half done with the menus...
Attached Files
#4
Posted 08 November 2008 - 09:18 AM
To me it doesn't seem to ask for it to be stored to a file. Just in an array.
So, initially you're program will initiate the data into an array and be able to read from it. It's probably best to write with that assumption and if it is needed, add it in later on.
Store in an array, say of 5 items where you can search for a username.
char user [5] [15];
char pin [5] [15]; // assuming a length of 15 characters max...
So, ask for two inputs of both. Search for the first, store key, check pin with index found by first, if correct, then carry on with that user...
So, initially you're program will initiate the data into an array and be able to read from it. It's probably best to write with that assumption and if it is needed, add it in later on.
Store in an array, say of 5 items where you can search for a username.
char user [5] [15];
char pin [5] [15]; // assuming a length of 15 characters max...
So, ask for two inputs of both. Search for the first, store key, check pin with index found by first, if correct, then carry on with that user...
#5
Posted 08 November 2008 - 09:25 AM
At no point in the directions is there a reference to a file. You can hard-code your arrays of usernames/passwords.
#6
Posted 08 November 2008 - 09:33 AM
I didnt get the array thing sorry.. Another Problem is about the cash transfer , Though now I am done with all the menus its just the username that is making me stop -_-


Sign In
Create Account


Back to top










