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
Create a program to deteate a program to determine whether a user-specified altitude [meters] is in the troposphere, lower strat
allsm [11]

Answer:

#include <iostream>

using namespace std;

int main()

{

   float altitude;

   cout<<"Enter alttitude in meter";

cin >>altitude;

if(altitude<0 || altitude > 50000)

{

   cout<<"Invalid value entered";

   return 0;

}

else{

   if(altitude<= 10000)

   {cout <<"In troposphere "<<endl;}

   

   else if(altitude>10000 && altitude<=30000)

   {cout <<"In lower stratosphere"<<endl;}

   

   else if(altitude>30000 && altitude<=50000)

   {cout <<"In upper stratosphere"<<endl;}

   

}

   return 0;

}

Explanation:

Define a float type variable. Ask user to enter altitude in meters. Store value to altitude variable.

Now check if value entered is positive and less than 5000,if its not in the range of 0-50,000 display a termination message and exit else check if it's in less than 10000, in between 10000 and 30000 or in between 30000 and 50000.

10,000 is above sea level is troposphere.

10,000-30,000 is lower stratosphere.

30,000-50,000 is upper stratosphere.

8 0
3 years ago
EDI stands for__________________ a) Electronic digital interface b) Electronic data interchange c) Enterprise data interface d)
vagabundo [1.1K]

The correct answer is B

6 0
3 years ago
Nanotechnology is a scientific area that deals with making or changing things that are incredibly _______________.
Dima020 [189]

Answer:

small

Explanation:

Nanotechnology deals with incredibly small things on the nanoscale.

3 0
3 years ago
If you type too much text on a PowerPoint slide, the additional text is added to a second slide.
Snowcat [4.5K]

Answer:

This is false

The text just goes out of the slide and you can't see it until you lower the font size or until you delete some of it.

Explanation:

5 0
3 years ago
The _______ move the fabric forward in the machine. A. pressure plates B. zipper feet C. hem guides D. feed dogs
Lyrx [107]
The equipment that move the fabric forward are called "Hem guides"
8 0
3 years ago
Other questions:
  • What is the name of the mvost powerful battery
    6·1 answer
  • A _____ is a network that uses multiple access points to link a series of devices that speak to each other to form a network con
    10·1 answer
  • Objects of the calculator class require no additional information when created. define an object named calc, of type calculator.
    14·2 answers
  • Which vendor did IBM select to create the operating system for the IBM PC?
    6·1 answer
  • A group of computers that are interconnected in order to share information or documents is called a _____.
    7·1 answer
  • The Windows taskbar is generally found _____. at the top of the screen in the Start menu at the bottom of the screen at the righ
    14·2 answers
  • A hardware compatibility list recommends striping with double parity as storage for an application. In a test environment, a tec
    13·1 answer
  • In cell M2, enter a formula using a nested IF function as follows to determine first if a student has already been elected to of
    12·1 answer
  • QUESTIONS Which of the following use cases are suitable for compute-optimized cloud offering? ОА. None of the listed O B. Highly
    12·1 answer
  • How do I get the pictures from my old Samsung phone to put on my iPhone? The Samsung is turned off. Is there a way to transfer i
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!