Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are to write a program that processes grade data using structures. Use scanf to input data and printf to output the results. You may

image text in transcribed

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

You are to write a program that processes grade data using structures. Use scanf to input data and printf to output the results. You may also use C++ style I/O if you prefer You are to work individually Include your name in the code comments. Failure to include your name may lead to a grade of zero Name your file lab2assignment.c. Failure to name the file correctly may lead to a grade of zero "Submit your program to the Learn page for the Lab 2 dropbox. "The input data will be a data file that you redirect into your program. The data file can be found at~dmk0080/ public/1040/labs/two/versionA/grades on the CSE server The assignment must be submitted by the end of the lab session. There are files to get you started on this assignment located in~dmk0080/public/1040/labs/two/versionA/ grades - the data file student.h - structure to hold the student information bubble.h - bubble sort function prototype bubble.c - bubble sort that sorts an array of student pointers lab8assignmentA.c - a main program to get you started Your program is to use two data structures to read in student grade data, perform some calculations, sort the students in ascending order by average, determine some class statistics, and output the results. The first data structure is classstats and should have variables mean (float), min (float), max (float), median (float), and name (character pointer). You will need to create this structure yourself, placing it above main () in lab8assignmentA.c and create one variable of type classStats (not a pointer) in your main program. The second data structure is called student and will have variables first (character pointer), last (character pointer), examl (integer), exam2 (integer), exam3 (integer), and mean (float). This structure is in the file student.h Take a moment to study this structure to understand it before using it. You will need to create an array of 19 student pointers and will need to allocate space for each in your main program using malloc () The data file contains the name of the course followed by 19 students, each student having three exam grades. Use the array of student pointers to store the information as read in using scanf. An example data file is below CSCE1040 Erica Kelley Uamie Shawna Muriel Marion Catherine Moss Kristin Fernandez 86 69 81 Elsa Cora Valerie Olson Anne Rene James Cedric Elijah Snyder 65 92 91 Roger Archie Melvin Sanders 75 89 67 Cummings 74 70 79 Reynolds 64 52 66 Huff Holmes Harmon 80 88 61 81 74 79 77 64 69 51 80 73 Alvarado 63 77 67 Spencer 76 79 71 85 78 79 Singleton 85 87 65 Boone Morgan Haynes 85 85 77 69 86 51 72 73 88 Howard Black Watkins 66 67 72 79 95 71 70 81 63 Use the three grades to determine the student's mean and store it with the name and exam grades in the student structure. Assumed each exam is weighted the same. Once all the students are read in and the averages determined, sort

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

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions

Question

What are the major social responsibilities of business managers ?

Answered: 1 week ago

Question

What are the skills of management ?

Answered: 1 week ago