..I am trying to create an ATM-like java applet program that will enable a user to check for their balance, make a deposit and withdraw a certain amount..

..The program will require a swipe card number(as if it is was a real ATM) but should be already included in the program..(assuming it already has 3 clients)..

..My problem is..it "should" has something to do with a 2-3 byte array..which at the first place, I cannot really understand well..

..I've checked already at google to find more stuffs about my concerns..but I can't find quite explanations about file handling using the 2-3 byte array..

..can somebody help me..??..

6 Years
Discussion Span
Last Post by JamesCherrill

Well, you need to first define what it is you need help with as I have no idea what you are talking about. What does a "-3 byte array" have to do with "FileHandling" and what is a "2-3 byte array" in your definition in the first place. If you Google as well as you ask here I can believe you are not finding anything that helps.


...ow...my fault..haha..

..well, the program has 3 clients having these swipe card numbers(1, 2, and 3)..
..1 client has a Balance of 0..

..2 client has a Balance of 1000..

..3 client has a Balance of 10000..

..if I clicked the swipe card button,

..an inputdialog box will appear asking for a swipe card number..whenever I entered any of those client number above(example "1") and press enter, I am allowed to access the file inside of that client number...like asking for my Balance("0")...and those 2 other options at the right..

.. 2-3 means 2 by 3 bytearray..even I don't know exactly what my mentor is trying to say about that..he is too strict that's why I cant find the strength to ask him about this..

..so that's it..I suppose...
..well, if it is still very troublesome..then, telling me more about file handling would be appreciated...

Attachments 184313_196068903745147_100000261150291_696578_8078646_n.jpg 31.77 KB

..ow i forgot..my question is..how can I use bytearray OR just file handling for my goal....??..


Just a guess, but... maybe your unhelpful "mentor" is suggesting a 2x3 array to hold your data ie
{ first swipe card no, account 1 balance},
{ second swipe card no, account 2 balance},
{ third swipe card no, account 3 balance}
... even so a byte array isn't going to work too well because the balances exceed 2^8.

I think you need to talk to your "mentor" again, no matter how hard that seems.

Edited by JamesCherrill: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.