Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ --------------------- Question 01 Consider an input file that contains student id (int), first name (string), last name (string), and grade (float). We presume that

c++ ---------------------image text in transcribed

Question 01 Consider an input file that contains student id (int), first name (string), last name (string), and grade (float). We presume that the file contains anywhere from 1 to 100 grades Write a program that: 'Declares the structure named student composed of ID (int), first (string), last (string), and grade (float) Asks the user for the name of the input file. *Do each of these tasks as separate functions: Reads grades from file named by user to fill up an array of type student. This file should be out of order on purpose (not in order by ID). Calculate and display the maximum grade in the array, along with student name. Calculate and display the minimum grade in the array, along with student name. o o o o Calculate and display how many students were processed. o Calculate and display the average grade of all students o Produce an output file with the information above, into a separate file provided by the user 'The main task is to explore the benefits of using structures so every task should be done after the array is filled up and not while it is being loaded. *Your test file must contain a minimum of 7 records EXTRA (+2.00): *Create an ordered array of students based on the initial array. This order can be by: id or grade - you choose 'You are required to print out the old and the new order to show your work. Make sure to comment your code for the sort algorithm selected (e.g. selection sort) You are not allowed to use data structures to automatically sort your array. This must be done by implementing an algorithm that you code as its own function

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

Question

List three specific uses of cumulative frequencies in business.

Answered: 1 week ago