Implement a Student class for grading evaluation with private attributes: studentID (int), midtermMarks (double), finalMarks (double), and assignmentMarks (double).
Student(int id, double mid, double fin, double assign).[0, 100].calculateGrade(double bonus = 0.0) that computes the weighted grade:total = (midtermMarks * 0.30) + (finalMarks * 0.50) + (assignmentMarks * 0.20) + bonus
Ensure the calculated grade is capped at a maximum of 100.0.
Student compareStudents(Student s1, Student s2) returning the Student object with the higher calculated grade.main(), create student objects, calculate grades with/without bonus, and determine the top performer.[Student 1] Student ID: 501 | Mid(30%): 80 | Final(50%): 75 | Assign(20%): 90 | Grade: 79.50% [Student 2] Student ID: 502 | Mid(30%): 90 | Final(50%): 88 | Assign(20%): 95 | Grade: 90.00% [Student 3] Student ID: 503 | Mid(30%): 60 | Final(50%): 70 | Assign(20%): 80 | Grade: 69.00% Student 1 with 5.0 bonus: 84.50% Top Performer: Student ID 502 with grade 90.00% [✓] Student grade weighting & comparison verified (Time: 0.008s, Memory: 2.1 MB)