Hi,
I have to complete this question
" Handling exceptions
Write a program that reads integers in from a file, adds them up (you dont need to store them just read the number add it to the total and move to the next number) and displays the total. Make this work before you try to handle any exceptions that may happen.
Once you have the above working try the following
Firstly check for a missing file can you catch that error and print out a suitable error message. Check it works change the file name to an invalid one and run what happens?
Then try handling incorrect data in the file what if there is a double or a string in the file can you stop the programming crashing and end the program? What is the best way to do this? Then test it works put some invalid data in the file and run the program again what happens?
"
I am really unsure which kind of exception or what It is I need to be doing,
Thanks!