Question: Each line in the file consists of a faculty member's first name, last name, rank, and salary.
Program: Write a program to display the total salary for assistant professors, associate professors, full professors, and all faculties, respectively, and show the average salary for assistant professors, associate professors, full professors, and all faculties, correspondingly.