For this lab exam you will try to store and sort the records of workers of a company. These records are composed by subfields (separated from each other by one white space) containing information about the worker. Because of missing or additional informations each workers record can have different number of subfields. Each subfield of a record will be composed of numbers and letters and it can have different length. Each persons records first subfield will be the workers unique ID. This ID will be composed of numbers and letters like other subfields. According to these informations an example record can be like these ones:
62gDF345 AnDeRs Friden vocalist 3334455
Eh43 JeSPer guitarist swedish
Your program will get a bunch of records each one separated by a new line character. After storing these records, you will sort the records ascending (increasing order) according to their IDs (first subfield). The ordering will be case insensitive (B is same as b) and the letters are considered bigger than the numbers.
The list of records will end with an extra new line character and there will be one query to control your algorithm. The query will be composed of three integers. The first one is the records number in the ordered list, the second one is the wanted subfields number, and the third one is the wanted characters number of this subfield. For example if the integers are x,y,z after sorting the records, you will print the x th records, y th subfields, z th character.
Some of the important points are:
--------------------------------
-Sorting will be case insensitive (b=B) and letters are considered bigger than numbers.
-The first record is considered 0 th record
-ID of each person is considered 0 th subfield of his record
-The first character of each subfield is considered the 0th subfield
-Each record can have different number of subfields
-Each subfield can have different length
-Each subfield can be composed of numbers or letters
-Subfields are separated by a single white space
-Records are separated by a new line character
-End of records is made by an extra new line character and it is followed by three integers
-I have found out how to store the data,but i couldnt sort it.