posted 17 years ago
Hello there! I was hoping I could get a few pointers on the code below!! Ok, here is the background for what I am doing.
1) The program will read the original sales data from SalesData.txt, that will create salesmen and then that information will be entered into the array list Salesman. The file looks like this (just so ya know):
Jones&2&5&3&0&8&SENIOR
Smith&6&0&2&0&5&JUNIOR
Douglas&1&0&7&5&3&ENTRY
Hollins&9&6&3&7&15&ENTRY
Smythe&0&0&0&0&0&SENIOR
Billings&0&7&12&15&2&JUNIOR
Kozak&3&5&8&22&0&ENTRY
2) Each salesman has a level type of ENTRY, JUNIOR, or SENIOR. There will be an enumerated class for the sales type. There is a variable, bonus, associated with each type. The bonus for SENIOR is 15%. The bonus for JUNIOR is 10%, and the bonus for ENTRY is 5%.
3) The user will be able to enter additional data on the GUI, either a new salesman and his product sales or the user can update an existing salesman.
4) Then once all of the data is entered the data will be written to the Salesman.data as objects.
5) Then also added to the GUI will be an additional button that when it is clicked the user will actually read the Salesman.data file, put the information in a vector, sort it, and last prints the information to the output area on the GUI in alphabetical order.
6) I need to create a NoSalesException. This exception will be thrown from calculateSales and handled from the calling method. To handle this exception, I will print a warning message dialog box that states the name of the salesman and that he has no sales.
I have worked on everything with the exception of the NoSalesException.
So, the program compiles fine, but then I believe the reason why it doesn't work properly after entering in all of the additional salesman information is in the readObjectData method. I was wondering if anyone has any tips or ideas for me in that regard, please just let me know if so. I will take any hlep I can get to finish this one up. Also, I am sorry if this is too detailed, I just thought I would give a good description of what I am doing to begin with that way you had a good understanding of what I am trying to do. Again, if anyone has any tips, ideas or help...please please let me know! Much appreciated!!
Sales:
Salesman:
Classification:
Thanks again!!!