1. This programming challenge is based on Total.java program onpage 515.
Suppose you wanted to add the total to an existing file(number.txt) instead of writing a new file. As you know, you cannotsimply specify the same file for input and output. When you specifyan output file that exists, the file is emptied before adding newoutput. Sadly, that is the same file as the input file. Thus, theinput file is now empty and the while loop exits immediately.Therefore no data is read.
Write rewrite Total.java using the pseudocodebelow so that you can add total to the existingfile:
Open a scanner for the file.
For
PayPal Gateway not configured
PayPal Gateway not configured