Question: The code and the output Chem 6A Project Introduction: We are going to simulate a university class list for the course Chem BA. Each Student
The code and the output
Chem 6A Project Introduction: We are going to simulate a university class list for the course Chem BA. Each Student Object has a firstName attribute, a lastName attribute, a studentld attribute, and a gradePercentage attribute. When new Student objects are created, they are added to the classList. Methods: - Level public static ArrayList passingStudents() - this method returns a list of strings. The list contains the full name of all the students who are passing. Passing students have a gradePercentage higher than 70%. Must use an enhanced for loop. Would you like to know which students are 'passing', how many students are 'seniors', 'remove' a student, 'transfer' a Student into the course , or 'sort' the list of students? Type 'quit' if done passing Passing Students: [Malakai Kong, Kendall Young, Shelby Stump] public static int countSeniors() - this method returns the amount of seniors in the course. Seniors have a studentld less than 250. Must use an enhanced for loop. Would you like to know which students are 'passing', how many students are 'seniors', 'remove' a student, 'transfer' a Student into the course or 'sort' the list of students? Type 'quit' if done seniors Number of Seniors: public static int search(String fName, String IName) - the method returns the index of the student being searched for. It takes on two String arguments fName and IName. The method will look for both fName and IName in classList and return the index. If the student is not in the classList, print "That student is not in Chem 6A." and return -1. This is a helper method for a couple of other methods. B-Level public static void remove(String fName, String IName) - this method removes the student It takes on two String arguments fName and IName. If full name is in the classList, remove the student, alert the user that the student was removed and print out the classList. If not, print "That student is not in Chem BA. Would you like to know which students are 'passing', how many students are 'seniors', 'remove' a student, 'transfer' a Student into the course or 'sort' the list of students? Type 'quit' if done remove Enter the first name of the student to remove: Josiah Enter the last name of the student to remove: Pace Josiah Pace was removed. #4*Chen6A Class List**4 Name: Kong, Malakai ID +: 708 Grade Percentage: 82.4% Name: Young, Kendall ID #: 703 Grade Percentage: 93.5% Name: Stump, Shelby ID 4: 226 Grade Percentage: 73.7% Name: King, Josiah ID +: 501 Grade Percentage: 68.9%