For each of the following Programming Problems, use the top-down modular approach and pseudocode to design a suitable program to solve it.
1.
a. Input names of students from the user, terminated by ”ZZZ”,0,0,0, and create a data file grades with records of the following form: student (String), test1 (Integer), test2 (Integer), test3 (Integer)
b. Display the contents of the file grades created in Part a. Each student’s record should appear on a separate line and include the total score (the sum of the three tests) for that student. For example, a line of output might be as follows:
R. Abrams 76 84 82 242
c. Modify the program of Part b so that at the option of the user, it displays either the entire contents of the file grades or just the record of a specified student. In either case, for each student displayed, also display his or her total test score.
2. Assume that a file named inventory, which contains the inventory of parts for the Legendary Lawn Mower Company (from Section 8.5), already exists with records of the following form: partNumber (Integer), partName (String), quantity (Integer)
Also assume that the records in this file are ordered by increasing part number. For each part of this problem, write a program that performs the indicated task.
a. Input a part number from the user and delete the corresponding record from the inventory file.
b. Input a part number and a quantity from the user and modify the record corresponding to that part number by changing the value of its last field to the quantity input.
c. Input a new part number, part name, and quantity from the user and insert the corresponding record in the proper place in the inventory