Question: DATA: Sarah 9 2 5 6 3 8 9 8 3 10 10 1 93 95 95 92 94 96 92 94 94 95 98


DATA:
Sarah 9 2 5 6 3 8 9 8 3 10 10 1 93 95 95 92 94 96 92 94 94 95 98 93 Jennifer 6 4 9 4 9 10 9 7 3 3 4 10 85 33 94 90 85 84 87 92 100 94 88 94 Joshua 4 0 9 9 1 3 3 7 6 2 1 0 94 85 84 89 82 95 90 94 50 97 91 97 Natalie 4 10 7 6 1 3 10 9 2 9 10 4 93 97 30 94 38 94 93 91 90 93 99 90 Scott 8 9 10 5 0 4 0 10 5 6 1 9 81 82 39 90 88 88 91 45 100 100 94 96 David 9 4 10 5 6 10 8 1 2 2 9 4 82 78 96 93 84 86 85 100 90 94 91 98 Megan 5 4 8 0 9 0 0 7 2 4 10 7 88 81 64 84 91 85 92 90 100 91 96 85 Emily 1 4 4 5 10 9 8 9 4 2 1 10 100 85 65 98 99 32 72 81 100 98 97 85 Sydney 9 2 4 10 2 5 8 7 3 6 10 3 72 82 100 82 80 88 95 33 95 96 93 99 Lily 10 1 10 7 6 8 0 10 5 4 7 4 87 85 100 89 81 88 83 84 95 99 90 98
Problem 2: Read Class Data from a File and Sort (50 points) The file ClassData10.txt contains grade information for 10 fictitious students. The file format is e Student Name 12 Reading Assignment Scores e 8 Homework Scores Scores for in-class participation, midterm 1, midterm 2, and the final project Using an array of type student.info, write a C program that 1. Reads the file information into a 10 element array of type student.info. Make sure you update the structure student info from problem 1 to accept 12 reading assignments and 8 homework scores. 2. Calculates the final grades for all 10 students. 3. Print the final scores in order, from highest to lowest. The following functions will sort an array of type int. Modify these functions to use variables of type student.info. Your program must make use of the following functions e void Print Student (student_info X) e void Scan_Student_Info(student_info *S, FILE *fp); int i, j void selection int x[], nt size) { // selection sort int max for {i = 0; x ?ma x)) // if found l?rger element sMap&xxmax) void swap (int *x, int y) int temp temp * x ; *y = temp ; Sample Code Execution: Red text indicates information entered by the user Grade information for Sarah Zybooks Scores [9, 2, 5, 6. 3. 8. 9. 8. 3. 10, 10, 1] Homework Scores [93. 95, 95, 92. 94, 96. 92, 94] In-class Participation Score-94 Midtern Scores-[95. 98] Final Project Score 93 Calculated Percentage-91.23 The Final Grade for Sarah is A Grade infornation for Lily Zybooks Scores [10. 1, 10, 7. 6, 8. 0. 10. 5, 4, 7. 4] Homework Scores [87. 85, 100, 89, 81, 88. 83, 84] In-class Participation Score-95 Midtern Scores-[99. 90] Final Project Score 98 Calculated Percentage The Final Grade for Lily is B 89.74 Grade information for David Zybooks Scores [9. 4, 10. 5. 6. 10. 8. 1. 2. 2, 9. 4] Homework Scores [82. 78. 96. 93. 84, 86. 85, 100] In-class Participation Score-90 Midtern Scores-[94. 91] Final Project Score 98 Calculated Percentage The Final Grade for David is B 88.98 Problem 2: Read Class Data from a File and Sort (50 points) The file ClassData10.txt contains grade information for 10 fictitious students. The file format is e Student Name 12 Reading Assignment Scores e 8 Homework Scores Scores for in-class participation, midterm 1, midterm 2, and the final project Using an array of type student.info, write a C program that 1. Reads the file information into a 10 element array of type student.info. Make sure you update the structure student info from problem 1 to accept 12 reading assignments and 8 homework scores. 2. Calculates the final grades for all 10 students. 3. Print the final scores in order, from highest to lowest. The following functions will sort an array of type int. Modify these functions to use variables of type student.info. Your program must make use of the following functions e void Print Student (student_info X) e void Scan_Student_Info(student_info *S, FILE *fp); int i, j void selection int x[], nt size) { // selection sort int max for {i = 0; x ?ma x)) // if found l?rger element sMap&xxmax) void swap (int *x, int y) int temp temp * x ; *y = temp ; Sample Code Execution: Red text indicates information entered by the user Grade information for Sarah Zybooks Scores [9, 2, 5, 6. 3. 8. 9. 8. 3. 10, 10, 1] Homework Scores [93. 95, 95, 92. 94, 96. 92, 94] In-class Participation Score-94 Midtern Scores-[95. 98] Final Project Score 93 Calculated Percentage-91.23 The Final Grade for Sarah is A Grade infornation for Lily Zybooks Scores [10. 1, 10, 7. 6, 8. 0. 10. 5, 4, 7. 4] Homework Scores [87. 85, 100, 89, 81, 88. 83, 84] In-class Participation Score-95 Midtern Scores-[99. 90] Final Project Score 98 Calculated Percentage The Final Grade for Lily is B 89.74 Grade information for David Zybooks Scores [9. 4, 10. 5. 6. 10. 8. 1. 2. 2, 9. 4] Homework Scores [82. 78. 96. 93. 84, 86. 85, 100] In-class Participation Score-90 Midtern Scores-[94. 91] Final Project Score 98 Calculated Percentage The Final Grade for David is B 88.98
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
