Question: scoreByName is a HashMap with String key type and Double value type, representing the name and test score of a student. Integer numData is read

scoreByName is a HashMap with String key type and Double value type, representing the name and test score of a student. Integer numData is read from input. Then numData key-value pairs are read from input and inserted into scoreByName.
If scoreByName has key "Ani", output "Ani's value: " followed by the value associated with "Ani".
Otherwise, output "Ani: not in scoreByName".
End with a newline.
Ex: If the input is:
3 Avi 78.5 Ani 67.0 Gil 52.0
then the output is:
Ani's value: 67.0

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 Programming Questions!