CS 60 Assignment a04 Due Midnight, morning of 24 February 2003 kwic index in Java The objective of this assignment is to use your OpenList java library to support the port of the kwic index program (a02.rex) to Java. You may use either your rex version or mine. It will be easier for me to help you, however, if you use mine. The Java version is different in its interface from the rex version in the following ways: 1) The Java version titles come from the standard input, one per line. 2) The Java version noise words are from a file, one per line, the name of which is specified on the command line. If there is no name specified, then there are no noise words. 3) The Java version number of left and right spaces come from the command line, following the name of the noise file. The number of left spaces can only be specified if the noise file name is specified. The number of right spaces can only be specified if the number of left spaces is. The default is 35 spaces. These do not count the space in the gutter, the colon, and the reference number. Example: On the command line: java kwic noise1.noise 35 25 < kwictest1.in Suppose noise1.noise contains: in in. In on on. On of of. Of the The to to. To and kwictest1.in contains The first thing we do let's kill all the lawyers. Throw physic to the dogs; I'll none of it. We are such stuff as dreams are made on. To thine own self be true. We know what we are, but know not what we may become. For in that sleep of death, what dreams may come. It is not in the stars to hold our destiny, but in ourselves. Sweet are the uses of adversity. Then the output would be: Sweet are the uses of adversity. : 7 The first thing we do let's kill all the lawyers. : 0 We are such stuff as dreams : 2 Sweet are the uses of adversity: 7 We are such stuff as dreams are made on. : 2 We know what we are, but know not what we: 4 We are such stuff as dreams are made on. : 2 To thine own self be true. : 3 at we are, but know not what we may become. : 4 We know what we are, but know not what we may : 4 t in the stars to hold our destiny, but in ourselves. : 6 hat sleep of death, what dreams may come. : 5 For in that sleep of death, what dreams may co: 5 It is not in the stars to hold our destiny, but in ourselves: 6 The first thing we do let's kill all the law: 0 Throw physic to the dogs; I'll none of it. : 1 We are such stuff as dreams are made on. : 2 For in that sleep of death, what dreams may come. : 5 The first thing we do let's k: 0 For in that sleep of deat: 5 It is not in the stars to hold our destiny, but in : 6 Throw physic to the dogs; I'll none of it. : 1 It is not in the stars to ho: 6 It is not in the stars to: 6 ow physic to the dogs; I'll none of it. : 1 The first thing we do let's kill all the lawyers. : 0 We know what we are, but kno: 4 We know what we are, but know not what we may beco: 4 irst thing we do let's kill all the lawyers. : 0 The first thing we do let's kill all the lawyer: 0 We are such stuff as dreams are made on. : 2 w what we are, but know not what we may become. : 4 in that sleep of death, what dreams may come. : 5 Throw physic to the dogs; I'll none of it. : 1 It is not in the stars to hold : 6 We know what we are, but know not what we may become. : 4 It is not in the stars to hold our destiny, but in ourse: 6 e stars to hold our destiny, but in ourselves. : 6 To thine own self be true. : 3 Throw physic to the dogs; I'll : 1 To thine own self be true. : 3 For in that sleep of death, what drea: 5 It is not in the stars to hold our destiny: 6 We are such stuff as dreams are made : 2 We are such stuff as dreams are : 2 Sweet are the uses of adv: 7 For in that sleep of death, what: 5 To thine own self be true. : 3 The first thing we do let's kill al: 0 Throw physic to the dogs;: 1 To thine own self be true. : 3 Sweet are the uses of adversity. : 7 We know what we are, but : 4 We are such stuff as drea: 2 know what we are, but know not what we may become. : 4 We know what we are, but know not what: 4 The first thing we do let's kill all the : 0 We know what we are, but know not: 4 We know what we are, but know not what we may become. : 4 For in that sleep of death, what dreams may come. : 5 If the noise file name is non-existent, you kwic should terminate with an error message: > java kwic foobar *** No such file for noise: foobar If either of the space numbers is not a number, your program should so-indicate: > java kwic noise1.noise foo < kwictest1.in *** Invalid integer specified: foo There is a runnable set of class files in /cs/cs60/a/04 that you can use for comparison with your own. There are also at least three input test files and a noise file in that directory.