Question: How can I add to the program to keep the averages for each student separately? for example- Bob 80,70,60 avg-70 Joe 90,95,92 avg- 92, etc

How can I add to the program to keep the averages for each student separately?

for example-

Bob 80,70,60 avg-70

Joe 90,95,92 avg- 92, etc How can I add to the program to keep the averages for

"Student java 3 1e import java.util.HashMap; 2 import java.util.Scanner 3 import java.util.Set; 4 public class Student f String name; int score; 8e Student (String name, int score) this.name -name; 9 10 this.score score; 13 49 public static void main(String [] args)f scanner sc-new Scanner(System.in); 6 HashMapcstring, Studentmap new HashMapO; 7 System.out.println("Enter name and score. Enter Q to quit "); 8 while(true) 9 :0 1 2 String name sc.next); if (name.equals("Q"))t break; int score sc.nextInt(); Student s new Student (name,score); map.put(name, s); 6 7 Set

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!