Hi,
I'm currently writing a
test main class for a BorrowerList and Borrower class. Within the main class, I need to be able to read and write to a file, so users can add details about borrowers such as name, telephone number etc.
I am currently able to save one borrower to the file, but I am then unable to read the file back, as it reports an error of,
Strangely enough, if I then manually edit the text file and remove the membership number and borrower limit, which are both integers, from the start of the line in the text file, it will then allow further borrowers to be added.
Then, the problem becomes that the test main class still doesn't save the value for the membership number or the borrower limit, which the user has input using the keyboard. Instead, it just saves '0 0'.
I am really lost as to why this might be happening. Any ideas??
My code so far is as follows,
1. Main class for testing the other classes,
2. BorrowerList class,
Any help or advice would be gratefully appreciated!!