CS302 Lab Assignment 7 Written: Due 11/20 (Last lab) 1. The following code tries to remove all strings in a string list that contain sub-string "bingo", suppose list is a LinkedList already filled in. Is anything wrong with the code? If so, expalain the error and fix it. int size = list.size(); for (int i=0; i< size; i++) { String temp = list.get(i); if (temp.indexOf("bingo") > 0) { list.remove(i); } } (4pts) 2. Convert the following recursive routine to a while loop. public double enter_gpa(Scanner scan) { System.out.print("\nEnter the gpa: "); double n = 0; try { n = Double.parseDouble(scan.nextLine()); if (n < 0 || n > 4) { System.out.println("Invalid gpa."); return enter_gpa(scan); } else return n; } catch (NumberFormatException e) { System.out.println("Not a number..."); return enter_gpa(scan); } } (5pts) 3. Name the person who invented Java. (1pt) Programming: Due 5pm 12/03 (submit by email, no labs on 11/27 and 12/4, so you have almost 3 weeks to work on it) (15pts) Delivery your progressive homeworks as a final working project, fix remaining problems. Your project will be evaluated based on (the number shows the priority): 1. Correctness of the functions: The system should allow adding, searching for and removing a student or a faculty. It allows adding, searching for and removing a course. A student is able to register for a course, provided he/she meets the prerequisites, has not exceeded the credit limit per semester, course is not full and he/she has not registered for this course yet. A student can drop a course that he/she already registered. A faculty can be assigned to teach a course if he/she belongs to the department that offers the course. Users of your system should be able to see a student record, including name, blazerid, address, major, gpa, credit hours and registered courses. They should also be able to see course info, including course name, ID, offering department, prerequisites, credits, instructor, student roll, capacity, the best student and the average student (based on gpa). For faculty, users should be able to see his/her basic info and courses that he/she is teaching. 2. Code efficiency and documentation 3. Handling of illegal input 4. Menu navigation hint: You should have a Course class, which better contains attributes like: LinkedList enrollment; Faculty instructor; int credit; String course_name; String course_id; String dept; LinkedList prerequisites; ... and corresponding methods that will modify and access the attributes. You should have a Student class with attributes like: LinkedList taken; LinkedList enrolled; double gpa; int credit_enrolled; ... The Faculty class should have: LinkedList teaching; String name; String dept; ... Write a report about what you have done, what problems remain. Email an electronic version of your report and source code to weic@cis.uab.edu by 5pm Dec. 3.