Question: Correct any problems you find with it. Make sure you put comments into the code indicated where, why and what you changed //This program creates
Correct any problems you find with it. Make sure you put comments into the code indicated where, why and what you changed
//This program creates Student objects //and overloads to compare student gs #include-iostream> #include-string> using namespace std class Student private L1 int year double gpa: public LS LE Student (const int, const int, const double); bool operator> (const Student,) Student:: Student (int i, int y, double g) 20 stuID = i ; //missing a year Y; gpa = g; 5 //missing> bool Student: operator>(const Student *otherStu) bool greater false if (gpa otherStu.gpa) greaterfalse return greater int main) Student a(ll1, 2, 3.50), b (222, 1, 3.00) if (a > b) else return 39 cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
