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
Semenov [28]
3 years ago
7

Write a static generic method PairUtil.minmax that computes the minimum and maximum elements of an array of type T and returns a

pair containing the minimum and maximum value. Require that the array elements implement the Measurable interface of Section 10.1.2.
Computers and Technology
1 answer:
Gnesinka [82]3 years ago
5 0

Answer:

Explanation:

The following code is written in Java. It is hard to fully create the code without the rest of the needed code including the T class and the Measurable interface. Regardless the following code can be implemented if you have that code available.

 public static T minmax(ArrayList<T> mylist) {

       T min = new T();

       T max = new T();

       for (int x = 0; x < mylist.size(); x++) {

           if (mylist.get(x) > max) {

               max = mylist.get(x);

           } else if (mylist.get(x) < min) {

               min = mylist.get(x);

           }

       }

       

       return (min, max);

   }

You might be interested in
What would be one duty of a network administrator
gulaghasi [49]

Answer:

designing the computer network

Explanation:

8 0
3 years ago
Assume that another method has been defined that will compute and return the student's class rank (Freshman, Sophomore, etc). It
ladessa [460]

Answer:

Option (D) i.e., s1.getClassRank( ); is the correct option to the following question.

Explanation:

Here, in the following option, the object "S1" is the object of the class "rank" and "getClassRank( )" is the function of that class "rank". so, in the following code the function "getClassRank( )" is called through the class object which computes and returns the class rank of the students.

So, that's why the following option is the correct way to call the function.

8 0
3 years ago
True false) ther are five arrow keys on the keborad​
cluponka [151]

Answer:

false, there's only 4

Explanation:

5 0
3 years ago
If I use google incognito mode or a throwaway google account can my search history be tracked by Microsoft parental controls?
3241004551 [841]

nu it would not but if they call microsoft to check it then yez the history would show up for them but dont try to make it notice able so they dont have to call

6 0
3 years ago
What is an active cooling solution for a PC?
mina [271]
Reduce the speed of the CPU
6 0
3 years ago
Read 2 more answers
Other questions:
  • Where do scanned documents go in windows 10?
    11·1 answer
  • А.<br> is the highest education degree available at a community college.
    6·1 answer
  • What is not an option when a user is exporting contacts to share with others?
    10·1 answer
  • The greatest common divisor of integers x and y is the largest integer that evenly divides into both x and y. Write a recursive
    7·1 answer
  • Next, Leah wants to add a content slide that allows her to insert a table.
    8·2 answers
  • Write an application that allows a user to enter any number of student quiz scores, as integers, until the user enters 99. If th
    5·1 answer
  • When hacking a website to test a secure connection and ensure internet safety, what is a good way to check the coding of the web
    14·1 answer
  • What is computer give definition ​
    14·2 answers
  • Why is the Microsoft website considered the best source for information about pagefile.sys?​
    15·1 answer
  • A classic game, Wario Land, has an invincible main character who reacts to the environment in order to solve puzzles. So, for ex
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!