answer.
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]
1 year 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]1 year 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
As an information user you should be skeptical of
Sati [7]
I should be skeptical of the credibility of sources that I have during the gathering. Be cautious and make sure that data comes of from trusted specialized sources. Trusted sources can be easily identified for their popularity on certain fields. Determine the purpose of the site and the data it contains.
5 0
2 years ago
Suppose that you need to maintain a collection of data whose contents are fixed- i.e., you need to search for and retrieve exist
Keith_Richards [23]

Answer:

Option a: a sorted array

Explanation:

Since the expectation on the data structure never need to add or delete items, a sorted array is the most desirable option. An array is known for its difficulty to modify the size (either by adding item or removing item). However, this disadvantage would no longer be a concern for this task. This is also the reason, linked list, binary search tree and queue is not a better option here although they offer much greater efficiency to add and remove item from collection.

On another hand,  any existing items from the sorted array can be easily retrieved using address indexing and therefore the data query process can be very fast and efficient.

4 0
2 years ago
Which word in brackets is most opposite to the word in capitals? PROSCRIBE (allow, stifle, promote, verify)​
Sunny_sXe [5.5K]

the answer would be stifle

7 0
1 year ago
Read 2 more answers
Kayle is building a web form. He has included space where users can input their phone numbers and email addresses. However, he w
Digiron [165]

Answer:

D. javascript

Explanation:

use form validation method bro

8 0
1 year ago
A DTP firm has published and printed flyers for an upcoming fundraising event. In which section of the flyer would you find the
QveST [7]
The Contact Details of the DTP firm would usually be found at the bottom of the flyer, to give way to the event to be advertised on the top and the middle of the flyer.
6 0
2 years ago
Other questions:
  • Email, instant messaging and most web traffic go across the internet in the clear; that is, anyone who can capture that informat
    15·2 answers
  • Annabeth has been using a public cloud to store and access her documents. Which drawback of a public cloud should she be aware o
    11·1 answer
  • 8. In time series, which of the following cannot be predicted? A) large increases in demand B) technological trends C) seasonal
    11·1 answer
  • Select the correct answer. James is a sales analyst of a departmental store chain. He checked the sale records for the past 12 m
    6·2 answers
  • How would GIS, GPS, or remote sensing technology be used to evaluate the destruction caused by a tornado in Oklahoma?
    13·1 answer
  • Write a class with a constructor that accepts a String object as its argument. The class should have a method that returns the n
    13·1 answer
  • Write a function named max that accepts two integer values as arguments and returns the value that is the greater of the two. Fo
    12·1 answer
  • Warm colors including red, yellow and orange _____________ be energetic and exciting to the eye, while cool colors in blue, gree
    11·1 answer
  • Which of the following has been a result of the increase in local organic farms?a decrease in farmers' markets
    10·2 answers
  • Modify the closest pair of points algorithm so that the separating line L now separates the first n/4 points (sorted according t
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!