. Download the program from the instructor’s GitHub account (Ch3HW) then update it to create a class Student that includes four properties: an id (type Integer), a name (type String), a Major (type String) and a Grade (type Double). Use class Student to create objects (using buttonAdd) that will be read from the TextFields then save it into an ArrayList. Perform the following queries on the ArrayList of Student objects and show the results on the listViewStudents (Hint: add buttons as needed): a) Use lambdas and streams to sort the Student objects by name, then show the results. b) Use lambdas and streams to map each Student to its name and grade, sort the results by grade (descending), then display the results. c) Use lambdas and streams to map each Student to its name and grade, to select the Students who have grade values in the range 80 to 90. Sort the results by grade value (descending), then show the results. d) Use lambdas and streams to calculate the total average of all Students grades, then show the result. e) Use lambdas and streams to group Students by major, then show the results.
. Download the program from the instructor’s GitHub account (Ch3HW) then update it to
create a class Student that includes four properties: an id (type Integer), a name (type
String), a Major (type String) and a Grade (type Double). Use class Student to
create objects (using buttonAdd) that will be read from the TextFields then save it into
an ArrayList. Perform the following queries on the ArrayList of Student objects and
show the results on the listViewStudents (Hint: add buttons as needed):
a) Use lambdas and streams to sort the Student objects by name, then show the results.
b) Use lambdas and streams to map each Student to its name and grade, sort the results
by grade (descending), then display the results.
c) Use lambdas and streams to map each Student to its name and grade, to select the
Students who have grade values in the range 80 to 90. Sort the results by grade value
(descending), then show the results.
d) Use lambdas and streams to calculate the total average of all Students grades, then
show the result.
e) Use lambdas and streams to group Students by major, then show the results.
Step by step
Solved in 3 steps