Before I indefinitely have to post my code for your help, I would like to ask a few questions. My assignment is as follows:
If they select to search for current employee information, the system should run the employee directory system from Homework #2 using the already determined input file. If the user chooses to add a new employee, the system should allow the user to enter information similarly to Homework #1’s input and save this new employee information into the input file. Finally, if the user selects to run the payroll for the employees, the system should calculate the deductions and net pay for every employee depending on their type (Net Weekly for Casual and Net Monthly for Full-time) in the input file and output the results to the output file chosen by the user.
So far, I have welcome the user to the system, then open the JFileChooser and you can choose the txt file. Then it prompts the user with the 4 options.
So my question(s) are -
How exactly do I go about calling the information from the determined input file?
Detailed - According to my homework, I have a txt file already made up by them ( which I do ). Now, I have to somehow get the information in the txt file into the program. If you select option 1 ( Search for Employee ), for example, after typing in their name / phone number / employee id, it is supposed to bring up their information from the txt file. Java confuses me greatly, and I really don't know how to do that. Our lab TA said a scanner class would be the best way to do it over the tokenizer method, but I dont know how to use a scanner at all >.>
We are also supposed to be able to add new employee's, so how would I get that to save to the file?
Detailed - According to my homework, if the user chooses to add a new employee, the system should allow the user to enter information in the same manner we did it in our very first project. So after the enter the information for the so called new employee, how do I get it to save to the same txt file I'm using to search the directory with and call up the payroll with?
If you want to see my code, I can post snippets of it but in reality I do not have a lot in the main program yet. Thanks for the help. I've spent awhile looking online for tutorials and the majority of them imho have been complete crap. I've yet to find anything related in anyway or similar in anyway that can possibly help me.
Thanks again

New Topic/Question
Reply




MultiQuote






|