Esc101 Laboratory Assignment Monday of Week of 8/11/04 1) Write a class "Record" with 3 fields: name (String), int (age), and double (salary). In the another class "EmployeeData" write a method "readRecords" which creates a large (say, of size 1000) array of records. Now it reads data of one record at a time from a file and saves in the array till the end of the file. The file contains a string (name), an integer number (age), and a double number (salary), again a string, int, double, so on. Each item is separated by end-of-line. After completing In the "main" method in a class "Test" create the employee record array and print it, one record per row. The aim of this assignment is to learn how to handle exceptions. In this case we do not know the number of records available in the file. You must use the EOFException to determine the end of the file and complete the reading process and return the array. Actually in this situation we are not using the exception handling machinary to avoid the bad impact of an undesirable exception but using the java exception handling machinary to perform a routine part of the process. In that sense it is a mis-use of the machinary but still a good exercise. 2) Write a program with following classes (i) an exception class, OutofRangeException, which is a subclass of Exception. Define a constructor which accepts a message string. (ii) a class Fivetuples. It has a method to take 2 parameters as input from the user, min and max. Then asks the user to input 5 numbers which should fall in this range(min-max). Finally it returns an array containing these 5 numbers. This method should generate the OutofRangeException as soon as a number out of range (min,max) is found. (iii) a Test class. Its "main" method gets a Fivetuple and prints the numbers. But if OutofRangeException occurs then it prints the message that all numbers were not in the range. For this "toString" method of excptions can be used.