Esc101 Laboratory Assignment Tuesday of Week of 8/11/04 1) Write a program that reads an integer from a file. The initial name of the file is known to be "data" but its extension is either "dat" or "txt" or "asc" or nothing. In other words the name of the file is either "data" or "data.asc" or "data.txt" or "data.dat". The program must systematically try to read one after one. Indeed we assume that only one such file exists. As soon as it succeeds it should not attempt any more. Then print the number. 2) Write a program with following classes (i) an exception class, NotaNameException, which is a subclass of Exception. Define a constructor which accepts a message string. (ii) a class Name. It has a method which reads a name, by reading character by character. Names do not have blank in them. Successive names are separated by one or more blanks. While reading a name if a non-English character appears, then this method must throw NotaNameException. (iii) a Test class. Its "main" method reads all the names in a file, say, "nameList.dat", and prints each name in the successive lines. If NotaNameException occurs then it prints the message that an illegal name is encountered. The process does not stop until the end-of-file is encountered.