Question: 1. Create a BlueJ project called Assignment 1. 2. Create a class called Student with the following: A field for a student ID number (String)

1. Create a BlueJ project called Assignment 1.

2. Create a class called Student with the following:

  • A field for a student ID number (String)
  • A field for the student's name (just one field for both first and last names)
  • A field for the student's GPA
  • A constructor to initialize the fields to values given by parameters
  • Setters and getters (mutators/accessors) for each field

3. Create a class called StudentList with the following:

  • A field that is an ArrayList to store Student objects.
  • A constructor to initialize the ArrayList to an empty list of size 20
  • A method to add a single student to the list.
  • A method to remove a single student from the list (specified by index position)
  • A method to print all the students (all information) in the list
  • A method to search for a student by ID number that returns the index position if found and -1 otherwise
  • A method to remove all student's below a specified GPA

4. Create a class called Driver with a main method that does the following (in the order stated):

  • Creates a new StudentList object
  • Creates (at least) five Student objects and adds them to the student list
  • Prints all the students in the list
  • Searches for one of the students in the list by ID number to get the index position
  • Removes that student from the list
  • Prints all the students in the list
  • Removes all the students with a GPA below 2.0 from the list
  • Prints all the students in the list

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!