import java.util.Scan X FREE AI Java Code zy Section 14.8 - CS 13 × *Course Hero G Google Homepage - Mgnt: X Answered: https://le X + https://learn.zybooks.com/zybook/VALDOSTACS1302MihailSpring2024/chapter/14/section/8 = zyBooks My library > CS 1302: Principles of Programming II home > 14.8: LAB: Student grades (HashMap) A ☆ " ویی zyBooks catalog Help/FAQ • Marlon Barrera Rondon Tomorrow's high To break record Given a HashMap pre-filled with student names as keys and grades as values, complete main() by reading in the name of a student, outputting their original grade, and then reading in and outputting their new grade. Ex: If the input is: Quincy Wraight 73.1 the output is: Quincy Wraight's original grade: 65.4 Quincy Wraight's new grade: 73.1 555804.3482728.qx3zqy7 LAB ACTIVITY 14.8.1: LAB: Student grades (HashMap) 0/10 StudentGrades.java Load default template... 1 import java.util.Scanner; 2 import java.util.HashMap; 3 4 public class StudentGrades { 6 public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String studentName; HashMap studentGrades = new HashMap(); 9 double studentGrade; 10 11 12 13 14 15 16 17 // Students's grades (pre-entered) studentGrades.put("Harry Rawlins", 84.3); studentGrades.put("Stephanie Kong", 91.0); studentGrades.put("Shailen Tennyson", 78.6); studentGrades.put("Quincy Wraight", 65.4); Develop mode Submit mode Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box. Search 3:57 PM 4/18/2024

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 6RQ
icon
Related questions
Question

Given a HashMap pre-filled with student names as keys and grades as values, complete main() by reading in the name of a student, outputting their original grade, and then reading in and outputting their new grade.

Ex: If the input is:

Quincy Wraight 73.1

the output is:

Quincy Wraight's original grade: 65.4 Quincy Wraight's new grade: 73.1

 

import java.util.Scan X
FREE AI Java Code
zy Section 14.8 - CS 13 ×
*Course Hero
G Google
Homepage - Mgnt: X
Answered: https://le X +
https://learn.zybooks.com/zybook/VALDOSTACS1302MihailSpring2024/chapter/14/section/8
= zyBooks My library > CS 1302: Principles of Programming II home > 14.8: LAB: Student grades (HashMap)
A
☆
"
ویی
zyBooks catalog
Help/FAQ
• Marlon Barrera Rondon
Tomorrow's high
To break record
Given a HashMap pre-filled with student names as keys and grades as values, complete main() by reading in the name of a student,
outputting their original grade, and then reading in and outputting their new grade.
Ex: If the input is:
Quincy Wraight
73.1
the output is:
Quincy Wraight's original grade: 65.4
Quincy Wraight's new grade: 73.1
555804.3482728.qx3zqy7
LAB
ACTIVITY
14.8.1: LAB: Student grades (HashMap)
0/10
StudentGrades.java
Load default template...
1 import java.util.Scanner;
2 import java.util.HashMap;
3
4 public class StudentGrades {
6
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
String studentName;
HashMap<String, Double> studentGrades = new HashMap<String, Double>();
9
double studentGrade;
10
11
12
13
14
15
16
17
// Students's grades (pre-entered)
studentGrades.put("Harry Rawlins", 84.3);
studentGrades.put("Stephanie Kong", 91.0);
studentGrades.put("Shailen Tennyson", 78.6);
studentGrades.put("Quincy Wraight", 65.4);
Develop mode
Submit mode
Run your program as often as you'd like, before submitting for grading. Below, type any needed
input values in the first box, then click Run program and observe the program's output in the
second box.
Search
3:57 PM
4/18/2024
Transcribed Image Text:import java.util.Scan X FREE AI Java Code zy Section 14.8 - CS 13 × *Course Hero G Google Homepage - Mgnt: X Answered: https://le X + https://learn.zybooks.com/zybook/VALDOSTACS1302MihailSpring2024/chapter/14/section/8 = zyBooks My library > CS 1302: Principles of Programming II home > 14.8: LAB: Student grades (HashMap) A ☆ " ویی zyBooks catalog Help/FAQ • Marlon Barrera Rondon Tomorrow's high To break record Given a HashMap pre-filled with student names as keys and grades as values, complete main() by reading in the name of a student, outputting their original grade, and then reading in and outputting their new grade. Ex: If the input is: Quincy Wraight 73.1 the output is: Quincy Wraight's original grade: 65.4 Quincy Wraight's new grade: 73.1 555804.3482728.qx3zqy7 LAB ACTIVITY 14.8.1: LAB: Student grades (HashMap) 0/10 StudentGrades.java Load default template... 1 import java.util.Scanner; 2 import java.util.HashMap; 3 4 public class StudentGrades { 6 public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String studentName; HashMap<String, Double> studentGrades = new HashMap<String, Double>(); 9 double studentGrade; 10 11 12 13 14 15 16 17 // Students's grades (pre-entered) studentGrades.put("Harry Rawlins", 84.3); studentGrades.put("Stephanie Kong", 91.0); studentGrades.put("Shailen Tennyson", 78.6); studentGrades.put("Quincy Wraight", 65.4); Develop mode Submit mode Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box. Search 3:57 PM 4/18/2024
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning