We need to analyze some text files that contain information about students marks obtained at some various scholar contests (the entry text files must be correct) and we need to determinate for each of the analyzed text files, the following:
1. Position occupied in the contest by the students of one or more specified schools within a specified city (output must contain: last name, first name and position at the end of the contest)
2. The participating/nonparticipating students in the contest (output must contain: last name, first name, city)
Cruz Penelope 13 School 5 Chicago 2
Smith Will 12 School 2 Chicago 1
Clooney George 10 High-School 3 Detroit 2
Connery Sean 10 School 5 Chicago
Cruise Tom 10 School 5 Chicago 1
(positions at the end of the contest for School No. 5 of Chicago) (output: last name, first name, position)
Cruz Penelope 2
Cruise Tom 1
(nonparticipating students) (output: last name, first name, city)
Connery Sean Chicago
The input text file contains information about students marks obtained at some various scholar contests. For each student we keep the following data (pay attention how the information is stored: spaces, no commas, etc):
Last_name First_Name Age School City [position_in_contest]
1. Last_name, First_name - represent the last and the first name of a student (a student can have more than one first name). They represent strings composed only by letters and they always start with uppercase. If the student have more than one first name, then the following first names are separated one from each other by at least one space or tab.
2. Age - represents the age of the student. Automatically, a natural number.
3. School - represent the school/high-school of the student and it has the following format: School/High-school School_Number
where School_Number represents a natural number (example: School 40 or High-School 3)
4. City - represent the city where the school/student is. It is composed by a string composed by one or more words (separated at least by one space or tab). Each word is composed only by letters and they always start with uppercase.
5. Position - represents the position held at the end of the contest by the student. It is a natural number. The position held in the contest can be not specified if that student didn't participate in the contest.
Note: Use all the facilities offered by FLEX. We don't desire to have hand-made code sequences. Don't use C/C++ where FLEX can be used.