Question: C++. Given the following class declaration: struct Student { char * name; float gpa; }; class StudentList { public: bool remove(const char name[], Student& aStudent);
C++. Given the following class declaration:
struct Student
{
char * name;
float gpa;
};
class StudentList
{
public:
bool remove(const char name[], Student& aStudent);
void findHighestGpa(Student& aStudent) const;
bool get(int index, Student& aStudent) const;
private:
struct Node
{
Student data;
Node * next;
};
Node * head;
int size;
};
Implement the function:
void StudentList::findHighestGpa(Student& aStudent) const; - function passes back the student with highest gpa through aStudent. You may assume each student has unique gpa.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
