Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started