1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vanyuwa [196]
3 years ago
7

How do you do this question?

Computers and Technology
1 answer:
elena55 [62]3 years ago
4 0

Answer:

for (scores.Entry<String, Integer> entry : scores.entrySet()) {

          int value=0; String key="Rambo";

          String k = entry.getKey();

           int v = entry.getValue();

           if (v>value)

           {

               value =v;

           }

           else

           {

               value=value;

           }  

       }

       for( scores.Entry<String, Integer> entry : scores.entrySet())

      {

        if( entry.getValue()==value)            

        System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());

      }

Explanation:

The above scores are an object of Map type.  And this is a parameter of findUopStudent function. So scores is a Map, and entry is an item. And we get its key and value. Now we compare each value using senteniel method and find the maximum value. Now we iterate through the scores using for the look and check the value of each entry against the maximum value found, and we print out the entry with maximum value. And that is the top student, which is required.  

You might be interested in
When a window is displayed in front of other windows, it's said to be
Dmitrij [34]
The active window

is the answer
7 0
3 years ago
I need answer pooooooo​
lara [203]
Read the instructions right, youll get ir done
7 0
3 years ago
Does anyone know any nitro type hack??
alexgriva [62]

Answer:

yes nitro hack is where they time your hacking skills

5 0
4 years ago
Read 2 more answers
Describe the advantages of using a template
Mariulka [41]
Ooh, ooh, ooh I know this one!

One advantage is that you don't have to make the entire layout of what you are doing from scratch. It is also time saving by not making you write everything.
6 0
3 years ago
4) What is a desktop?​
DaniilM [7]
A desktop computer is a personal computer designed for regular use at a single location on or near a desk due to its size and power requirements.
3 0
1 year ago
Other questions:
  • What helps in determining the reliability of a person to repay debt?
    12·2 answers
  • Hot five was the famous band of which musician?
    14·1 answer
  • Which of the following names in a program is equivalent to the name int?
    15·2 answers
  • When adapting graphs for slides,
    6·1 answer
  • Importance of being having data on hand​
    7·1 answer
  • If Nancy receives an encrypted message from Matthew, which key does she use to read it? Nancy’s private key Nancy’s public key M
    8·1 answer
  • VURULU<br> The default style in Word is called the
    6·1 answer
  • The area surrounding your car that can't be seen from the driver's seat is called
    14·2 answers
  • Write a program using integers userNum and x as input, and output userNum divided by x three times.
    11·1 answer
  • Suppose you are given a sequence that is described by a formula, starting at index n=0. If you need to change the starting index
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!