Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C Code: **File data below: **File Data: Sarah 9 2 5 6 3 8 9 8 3 10 10 1 93 95 95 92

In C Code:

**File data below:

image text in transcribed

image text in transcribedimage text in transcribedimage text in transcribed

**File 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 Student Name 12 Reading Assignment Scores 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 studentinfo Your program must make use of the following functions void Print Student (student info X); void Scan_Student_Info(student_info *S, FILE *fp); int i, ji void selection (int x], int size I/ selection sort int max; for (i = 0; i x [max]) //if found a larger element max-j; I/ move it to the fron t swap (6%[1], &x[max ] ) ; void swap (int *x, int *y int temp temp = *x; *y temp 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 Student Name 12 Reading Assignment Scores 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 studentinfo Your program must make use of the following functions void Print Student (student info X); void Scan_Student_Info(student_info *S, FILE *fp); int i, ji void selection (int x], int size I/ selection sort int max; for (i = 0; i x [max]) //if found a larger element max-j; I/ move it to the fron t swap (6%[1], &x[max ] ) ; void swap (int *x, int *y int temp temp = *x; *y temp

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

Does it avoid using personal pronouns (such as I and me)?

Answered: 1 week ago

Question

Does it clearly identify what you have done and accomplished?

Answered: 1 week ago