Case Study Follow-Up
1.Rewrite the processOneSitemethod in the Rainfallapplication, replacing the for
loop with a doloop.
2.Rewrite the processOneSitemethod in the Rainfallapplication, replacing the for
loop with a whileloop.
3.Change mainin the Rainfallapplication so that it asks the user for the input file
name using a JFrame, and catches the FileNotFoundExceptionif the name is
invalid. In the case of an invalid file name, the user should be asked to reenter
the file name until a valid name is entered or the user closes the JFrame
(signalling that he or she wants to stop the application)
4.Change the doloop in mainin the Rainfallapplication to be a whileloop.
5.Could the module Get Rainfall Amount be made a method? Explain.
477