Question: Program: highest _ gpa.py Implement a Student class that stores their first name, last name, and GPA. The Student class must contain three methods: get
Program: highestgpa.py
Implement a Student class that stores their first name, last name, and GPA. The Student class must
contain three methods: get gga get first get. last Each method will return the corresponding
value stored within the Student object.
You will also need to implement a Course class. The Course class contains a single list called roster,
which includes a list of Student objects that have been added to the Course. The Course class must
implement the following methods: addstudent and course size
The add student method takes a Student object as a parameter and appends it to the roster
list.
The course size method returns the number of Student objects in the roster list.
The Course class also needs to implement the find student highest.gpa method.
This method returns the Student object of the student with the highest GPA in the
course.
Write a program that allows a user to add multiple students to the course until a stop word has been
entered. After the stop word, your program should print out the number of students enrolled in the
course and the first, last, and gpa of the student with the highest GPA.
Your program should be able to handle the ValueError exception if a user enters a nonnumeric GPA for a
student. The program should not stop executing if a ValueErcor is raised. If the roster is empty, the
find student highest gpa method should raise a custom EmptyRosterError with the message
'Exception: Course Roster is Empty.
Your style of coding is just as important as the correctness of your program. Unlike your programs in
the lab, you will be evaluated on your variable names and use of comments in addition to the program output. Your code must include a block comment at the top of your Python file with your name and a description of your program.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
