Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS1325 Homework #6 This homework assignment gives you the opportunity to practice sorting/searching and arrays of structures. HW6 (Graded out of 100) Write a program

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

CS1325 Homework #6 This homework assignment gives you the opportunity to practice sorting/searching and arrays of structures. HW6 (Graded out of 100) Write a program that manages students' information. Each student's information consists of a netID and a GPA, maintained in a structure. The program will loop on displaying the following menu of choices: 1. List the top n students 2. Search for a student by netiD 3. Exit the program. If the user chooses 1, the user will be prompted for the value of n, and the netlD and GPA of the top n students will be listed, starting with the student with highest GPA and going down. If the user chooses 2, user will be prompted to enter the student's netID. If the netID is found in the netID array, the array index and the GPA of the student are displayed. If the student is not found, a "Student not found" message is displayed. 1. Additional Requirements-Make sure you comply with all the requirements to avoid losing points a) Definitions (you may copy and paste, but be sure to strip any non-ASCII as necessary) Define this structure struct studentRecord int netID; double GPA; typedef struct studentRecord Student Define these arrays in the main function (for consistency, please use the same names to make the grading easier) #de fine NUM ELMTS 10 // Original array of Student structures Student studArray [NUMELMTS] 7Copy of original array that will be sorted by GPA Student copySortedbyGPA [NUMELMTS CS1325 Homework #6 This homework assignment gives you the opportunity to practice sorting/searching and arrays of structures. HW6 (Graded out of 100) Write a program that manages students' information. Each student's information consists of a netID and a GPA, maintained in a structure. The program will loop on displaying the following menu of choices: 1. List the top n students 2. Search for a student by netiD 3. Exit the program. If the user chooses 1, the user will be prompted for the value of n, and the netlD and GPA of the top n students will be listed, starting with the student with highest GPA and going down. If the user chooses 2, user will be prompted to enter the student's netID. If the netID is found in the netID array, the array index and the GPA of the student are displayed. If the student is not found, a "Student not found" message is displayed. 1. Additional Requirements-Make sure you comply with all the requirements to avoid losing points a) Definitions (you may copy and paste, but be sure to strip any non-ASCII as necessary) Define this structure struct studentRecord int netID; double GPA; typedef struct studentRecord Student Define these arrays in the main function (for consistency, please use the same names to make the grading easier) #de fine NUM ELMTS 10 // Original array of Student structures Student studArray [NUMELMTS] 7Copy of original array that will be sorted by GPA Student copySortedbyGPA [NUMELMTS

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

More Books

Students also viewed these Databases questions