Question: For your lab, you will need to define a class Student, with private members for first name, last name, and GPA, and any methods you

For your lab, you will need to define a class Student, with private members for first name, last name, and GPA, and any methods you determine that you need (constructors, gets/sets, etc.) Once the class is defined, you will need to populate an array of Student objects to be sorted with data provided in the students.txt file. The format of this data file is as follows:

The first line contains an integer, which is a count of the number of student records contained in the file. You can use this value to define the size of the array.

Note: When I test your code, I may not use the same input file, so you will need to dynamically size the array based on the file input.

Every line after the first contains three pieces of information, separated by spaces:

First Name, Last Name, and GPA

Once the array is populated with the student data, we are ready to start sorting! Choose two of the three sorting algorithms we discussed in class (MergeSort, QuickSort, and HeapSort), and implement them to sort the Student data by GPA.

To test your code, and prepare it for submission, create a menu-based driver that provides 5 options:

Load the Data

This will load the data from the text file. Once the data has been sorted, this option will also reload the data, so it can then be sorted again with the second method for testing.

View the Data

This will just print out the current contents of the array, either sorted or unsorted.

Sort using the first algorithm

Sort using the second algorithm

Exit the program

(Sample below)For your lab, you will need to define a class Student, withprivate members for first name, last name, and GPA, and any methodsyou determine that you need (constructors, gets/sets, etc.) Once the class is

You'll use those sorting algorithms to sort an array of Student objects, the data for which has been provided

20 Andrew Koch 2.0 Landyn Adkins 2.6 Jakobe Carey 2.7 Troy Murray 2.9 Cullen Dyer 3.0 Zaire Murphy 2.2 Zaniyah Martinez 3.7 Nolan Lynch 0.6 Josh Harris 1.3 Alejandra Stevens 2.1 Reginald Graves 1.9 Raelynn Castro 3.8 Oscar Norman 1.1 Emerson Randolph 4.0 Mitchell Roman 3.0 Alessandro Huff 0.9 Clarissa Rocha 3.1 Pedro Acevedo 1.1 Katelyn Gilmore 1.9 Julianna Carroll 4.0

c++

Select D: \ Projects \ Grading_Platform \ Debug \ Grading_Platform.exe =n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!