Search for question
Question

3. The program is now ready to accept data or commands from its standard input. The data input for the

program can be either information about a prof or a student and thus can be in either of the following formats

that starts with the letter I. The individual fields are comma separated.

Where the first record format is meant for profs and would have the value of ptype as P. For example,

The second record format is meant for students and would have the value of ptype as S. For example,

Other fields are described below:

id → is a 9 digit number, used to unquely recognize the individual person.

name, dept, and faculty → maximum 30 characters, may have spaces in it to separate the words.

hireyear, admyear → year of the calendar, 4 digit numbers.

tenured → Y or N to indicate whether a prof is tenured or not.

For this form of data input, other than I, id and ptype, any of the other fields could empty. For example,

below inputs are also valid.

Your program will maintain this personnel information in a linked list. It should be ordered (ascending) based on the id field.

Fig: 1