Menu

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

Create a class called StudentRecord that has the following private variables: firstName, lastName, year, GPA Implement 2 cons

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 Implement a toStringl) method that returns text representation of an object according to the following template a. b. c. First name: Benoit, last name: Mandelbrot, year: 3, GPA: 3.68 method, that performs comparison as the following: 1. Compare based on last name 2. If last names are equal, compare first names. 3. If last and first names are equal, compare years 4. If last, first names and years are equal, compare GPA. e. Create a client class, which: 1. Creates an array list studentRecords; Adds the following student records to the list: 2. 1) First name: Jes, last name: Reynaldsson, year: 1, GPA: 3.4; 2) First name: Valeria, last name: Revnaldsson, year: 1, GPA: 3.7; 3) First name: Valeria, last name: Revnaldsson, 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. Write a method that sorts an array of integers using insertion sort. 2. 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 Implement a toStringl) method that returns text representation of an object according to the following template a. b. c. First name: Benoit, last name: Mandelbrot, year: 3, GPA: 3.68 method, that performs comparison as the following: 1. Compare based on last name 2. If last names are equal, compare first names. 3. If last and first names are equal, compare years 4. If last, first names and years are equal, compare GPA. e. Create a client class, which: 1. Creates an array list studentRecords; Adds the following student records to the list: 2. 1) First name: Jes, last name: Reynaldsson, year: 1, GPA: 3.4; 2) First name: Valeria, last name: Revnaldsson, year: 1, GPA: 3.7; 3) First name: Valeria, last name: Revnaldsson, 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. Write a method that sorts an array of integers using insertion sort. 2.

Expert Answer


Answer to Create a class called StudentRecord that has the following private variables: firstName, lastName, year, GPA Implement 2… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *