This function displays all the grades assigned to students based on the classes they take.
By following these steps, you can efficiently review student grades for specific classes and semesters, ensuring accurate record-keeping and assessment tracking.