[Solved]Create Class Called Studentrecord Following Private Variables Firstname Lastname Year Gpa Q37255508

Create a class called StudentRecord that has the following private variables firstName, lastName, year, GPA Implement 2 constructors: default constructor (doesn’t take any parameters, has an empty body) and a constructor, that initializes all variables. a. b. c. Implement a toString) method that returns text representation of an object according to the following template First name: Benoit, last name: Mandelbrot, year: 3, GPA: 3.68 d. Implement Comparable interface, so that StudentRecord class has compareTo method, that performs comparison as the following: 2. 3. 4. If last names are equal, compare first names. If last and first names are equal, compare years. If last, first names and years are equal, compare GPA. Create a client class, which: e. 1. Creates an array list studentRecords; Adds the following student records to the list 1) First name: Jes, last name: Reynaldsson, year: 1, GPA: 3.4; 2) First name: Valeria, last name: Reynaldsson, year: 1, GPA: 3.7; 3) First name: Valeria, last name: Reynaldsson, year: 2, GPA: 3.5; 4) First name: Valeria, last name: Reynaldsson, year: 1, GPA: 3.68 3. Sorts the list and prints it out. 2. Write a method that sorts an array of integers using insertion sort. Show transcribed image text Create a class called StudentRecord that has the following private variables firstName, lastName, year, GPA Implement 2 constructors: default constructor (doesn’t take any parameters, has an empty body) and a constructor, that initializes all variables. a. b. c. Implement a toString) method that returns text representation of an object according to the following template First name: Benoit, last name: Mandelbrot, year: 3, GPA: 3.68 d. Implement Comparable interface, so that StudentRecord class has compareTo method, that performs comparison as the following: 2. 3. 4. If last names are equal, compare first names. If last and first names are equal, compare years. If last, first names and years are equal, compare GPA. Create a client class, which: e. 1. Creates an array list studentRecords; Adds the following student records to the list 1) First name: Jes, last name: Reynaldsson, year: 1, GPA: 3.4; 2) First name: Valeria, last name: Reynaldsson, year: 1, GPA: 3.7; 3) First name: Valeria, last name: Reynaldsson, year: 2, GPA: 3.5; 4) First name: Valeria, last name: Reynaldsson, year: 1, GPA: 3.68 3. Sorts the list and prints it out. 2. Write a method that sorts an array of integers using insertion sort.
Expert Answer
Answer to Create a class called StudentRecord that has the following private variables firstName, lastName, year, GPA Implement 2 … . . .
OR

