Question: Complete the Course class by implementing the dropStudent ( ) method, which removes a student ( by last name ) from the course roster. If
Complete the Course class by implementing the dropStudent method, which removes a student by last name from the course roster. If the student is not found in the course roster, no student should be dropped. Assume all students have distinct last names.
Given classes:
Class Course represents a course, which contains an ArrayList of Student objects as a course roster. Type your code in here.
Class Student represents a classroom student, which has three private fields: first name, last name, and GPA. Hint: getLast returns the last name field.
Ex: If the following students and their GPA values are added to a course:
Henry Nguyen with GPA
Brenda Stern with GPA
Lynda Robison with GPA
Sonya King with GPA
then dropStudentlast where last is "Stern", removes a student and the program output is:
Course size: students Course size after drop: students
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
