Java Suppose that the class Score is defined as class ScoreInfo {     String firstName;     String lastName;     int score;     Score( String lName, String fName, int s ) {         firstName = fName;         lastName = lName;         score = s;     } } and that scoreData is an array of ScoreInfos containing information about the scores of students on a test. Use the stream API to do each of the following tasks: print the number of students (without using scoreData.length) print the average score for all of the students print the number of students who got an A (score greater than or equal to 90) use the collect() stream operation to create a List that contains the names of students whose score was less than 70; the names should be in the form first name followed by last name print the names from the List that was generated in the previous task print out the student's names and scores, ordered last name print out the student's names and scores, ordered by score You can put all of the code in main() routine and include ScoreInfo as a static nested class. Do not use any for loops or other control structures. Do everything using the stream API. For testing your code, you can use this array: private static ScoreInfo[] scoreData = new ScoreInfo[] {         new Score("Smith","John",70),         new Score("Doe","Mary",85),         new Score("Page","Alice",82),         new Score("Cooper","Jill",97),         new Score("Flintstone","Fred",66),         new Score("Rubble","Barney",80),         new Score("Smith","Judy",48),         new Score("Dean","James",90),         new Score("Russ","Joe",55),         new Score("Wolfe","Bill",73),         new Score("Dart","Mary",54),         new Score("Rogers","Chris",78),         new Score("Toole","Pat",51),         new Score("Khan","Omar",93),         new Score("Smith","Ann",95) };

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Java Suppose that the class Score is defined as class ScoreInfo {     String firstName;     String lastName;     int score;     Score( String lName, String fName, int s ) {         firstName = fName;         lastName = lName;         score = s;     } } and that scoreData is an array of ScoreInfos containing information about the scores of students on a test. Use the stream API to do each of the following tasks: print the number of students (without using scoreData.length) print the average score for all of the students print the number of students who got an A (score greater than or equal to 90) use the collect() stream operation to create a List that contains the names of students whose score was less than 70; the names should be in the form first name followed by last name print the names from the List that was generated in the previous task print out the student's names and scores, ordered last name print out the student's names and scores, ordered by score You can put all of the code in main() routine and include ScoreInfo as a static nested class. Do not use any for loops or other control structures. Do everything using the stream API. For testing your code, you can use this array: private static ScoreInfo[] scoreData = new ScoreInfo[] {         new Score("Smith","John",70),         new Score("Doe","Mary",85),         new Score("Page","Alice",82),         new Score("Cooper","Jill",97),         new Score("Flintstone","Fred",66),         new Score("Rubble","Barney",80),         new Score("Smith","Judy",48),         new Score("Dean","James",90),         new Score("Russ","Joe",55),         new Score("Wolfe","Bill",73),         new Score("Dart","Mary",54),         new Score("Rogers","Chris",78),         new Score("Toole","Pat",51),         new Score("Khan","Omar",93),         new Score("Smith","Ann",95) };
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education