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
This function returns the length of a string:
Anna71 [15]

Answer:

The strlen() function calculates the length of a given string.The strlen() function is defined in string.h header file.

Explanation:

It doesn’t count null character ‘0’. Syntax: int strlen(const char *str); Parameter: str: It represents the string variable whose length we have to find. Return: This function returns the length of string passed.

4 0
2 years ago
Three IT Companies. Help me please!
GuDViN [60]

Answer:

Apple, Samsung and Foxconn

Explanation:

They are the leading it companies today

3 0
3 years ago
Read 2 more answers
Are brake and break pronounced the same way?​
erastova [34]

Answer:

one is correct and yes

Explanation:

4 0
3 years ago
Choose the correct answer base on the Components of Computer System
kondor19780726 [428]
1 - b - Excel is a computer program, so it'd be Software
2 - a - Process of elimination, haven't heard of the term 'peopleware' before.
3 - d - A joystick accepts input from a user to interact with a computer. ex. Flight Simulators
4 - c - A monitor will display (or output) an image based on what is received from the computer.
4 0
3 years ago
What is the characteristics of a spear phishing message
Cerrena [4.2K]
It is targeted at one person specifically. More work for the attacker, but higher chances of obtaining sensitive information.
7 0
3 years ago
Read 2 more answers
Other questions:
  • What are the commands used in windows 2012 to mount the nfs share on the linux server?
    8·1 answer
  • 1 megabyte is equal to 1024 gigabyte. True/False​
    11·2 answers
  • Question 2 (2 points)
    6·1 answer
  • Which of the following is not an advantage of concurrent design?
    10·2 answers
  • Zach would like to reuse a spreadsheet that he created last year. However, he will need to delete the contents of several cells.
    5·1 answer
  • In what other game can kids line up in a row
    6·1 answer
  • WILL GIVEE BRAINLIEST ANSWER!!!!
    14·1 answer
  • A database planner names a field “Organic ingredients_3”. Why would this name Create possible problems in programming?
    8·2 answers
  • Match the desired outcome to the appropriate action.
    6·1 answer
  • HELLLLLLLLPPPPPPPPPPPP HHHHHHHHHEEEEEEEEELLLLLLPPPPPP MEEEEEEEE
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!