Question: PLEASE READ THE QUESTION CAREFULLY AND THEN ANSWER. THE CODE SHOULD BE IN C. PART 2 Average Grade Calculator There are 10 students enrolled in

PLEASE READ THE QUESTION CAREFULLY AND THEN ANSWER. THE CODE SHOULD BE IN C.

PLEASE READ THE QUESTION CAREFULLY AND THEN ANSWER. THE CODE SHOULD BE

PART 2 Average Grade Calculator There are 10 students enrolled in a course. The course covers x number of chapters from a textbook (x > 1) In each chapter y number of homework(s) are assigned (y 2 1). The average grade for each homework in all the chapters need to be found out. To solve this, write program which has the main process as Director process, which reads a file containing grades of all homeworks of all chapters and creates x number of Manager processes. Each Manager process will take care of solving a chapter. Each manager process will create y number of Worker process and pass one homework to each of them and they calculate and print the average The input file should contain the data according to the value of x and y. For example, the input text file and the process tree for x- 2 and y 2 will look like the following File Edit View Search Tools Documents Help Director /E) quiz-grades x 19 17 20 18 9 6 10 9 12 11 10 16 3 79 10 0 5 8 6 15 13 15 15 20 18 18 16 17 19 19 18 13 15 14 12 10 13 18 15 Manager 1 Manager 2 Worker 1 Worker 2 Worker 3Worker 4 The Director process is responsible for opening and closing the input text file. It stores the values in a two dimensional integer array with 10 rows. You may need to use the following C functions (in addition to the necessary file & process management system calls): fopen(), fscanf(), fseek(), fclose) PART 2 Average Grade Calculator There are 10 students enrolled in a course. The course covers x number of chapters from a textbook (x > 1) In each chapter y number of homework(s) are assigned (y 2 1). The average grade for each homework in all the chapters need to be found out. To solve this, write program which has the main process as Director process, which reads a file containing grades of all homeworks of all chapters and creates x number of Manager processes. Each Manager process will take care of solving a chapter. Each manager process will create y number of Worker process and pass one homework to each of them and they calculate and print the average The input file should contain the data according to the value of x and y. For example, the input text file and the process tree for x- 2 and y 2 will look like the following File Edit View Search Tools Documents Help Director /E) quiz-grades x 19 17 20 18 9 6 10 9 12 11 10 16 3 79 10 0 5 8 6 15 13 15 15 20 18 18 16 17 19 19 18 13 15 14 12 10 13 18 15 Manager 1 Manager 2 Worker 1 Worker 2 Worker 3Worker 4 The Director process is responsible for opening and closing the input text file. It stores the values in a two dimensional integer array with 10 rows. You may need to use the following C functions (in addition to the necessary file & process management system calls): fopen(), fscanf(), fseek(), fclose)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!