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
allochka39001 [22]
3 years ago
9

Write the definition of a static method named isSorted that receives two arguments: an array of references to objects that imple

ment the Comparable interface and a boolean. If the boolean is true then the method returns true if the objects referenced in the array are in ascending order. On the other hand, if the boolean is false, the method returns true if the objects are in descending order. The method also returns true for arrays of 0 or 1 length. For all other situations, the method returns false
Computers and Technology
2 answers:
Dmitry [639]3 years ago
7 0

Answer:

public static boolean isSorted(Comparable[] x, boolean y)

{

boolean isAscending = true;

if (x.length == 0 || x.length == 1) return true;

else if (y) {

for (int i = 0; isAscending && i < x.length - 1; i++)

if (x[i].compareTo(x[i + 1]) > 0) isAscending = false; // descending

} else {

for (int i = 0; isAscending && i < x.length - 1; i++)

if (x[i].compareTo(x[i + 1]) < 0) isAscending = false; // ascending

}

return isAscending;

}

Explanation:

See answer

IgorC [24]3 years ago
5 0

Explanation:

Program:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace StaticMethods1

{

   class comparable

   { p=small object, m=medium object,  G=big object

       public static comparable  objects (int p, int m,g)

       {

           int s = p≤ m≤ g;

           true;

       }

       public static int Subtract (int P, int M,int G)

       {

           int r = p≥m≥g ;

           return r;

       }

   }

   class Program

   {

       static void Main (string [] args)

       {

           Console.Write ("comparable p ≤ m is");

           Console.WriteLine (comparable (p,≤ m));

           Console.Write ("comparable m≤g is");

           Console.WriteLine (comparable operacion (g≥m≥p));

           Console.ReadKey ();

You might be interested in
How do you view a presentation as your audience would see it?
Nutka1998 [239]
<h3>Answer:</h3>

Option B is the correct answer.

=> By clicking slideshow button.

<h3>Explanation:</h3>

A view in which audience should see the presentation is the SLIDE SHOW VIEW.

Slide show can be started by clicking on the Slide show tab than choose one of the desired option/ways to SET UP SLIDE SHOW.

<h3>I HOPE IT WILL HELP YOU!</h3>
5 0
3 years ago
Read 2 more answers
Describe how layers in the ISO reference model correspond tolayers in the TCP/IP reference model.
Alexxx [7]

Answer and explanation : The TCP/IP means TRANSMISSION CONTROL PROTOCOL AND INTERNET PROTOCOL It governs all the communication which are performed over network it has a set of protocol. It defines how different types of conversation are performed without any fault through a network

THERE ARE 5 TYPES OF LAYER IN TCP/IP MODEL

  • APPLICATION LAYER: It is present at upper level it is used for high level products for the network communication
  • TRANSPORT LAYER: This layer is used for transfering the message from one end to other end
  • NETWORK LAYER : Routers are present in network layer which are are responsible for data transmission
  • DATALINK LAYER : it is used when there is any problem in physical layer for correcting this datalink are used
  • PHYSICAL LAYER: Physical; layer are responsible for codding purpose which we used in communication process

5 0
4 years ago
Which keys can be pressed to change the cuboid/frame selector color on remotasks lidar course
Dmitry_Shevchenko [17]

Answer:

c h b l

color palette and a lightbulb

5 0
3 years ago
645656565656564548778465132131321231
irga5000 [103]
I don’t get this but you just put random number
6 0
3 years ago
Mel is a research scientist at a health sciences center. His job requires him to analyze large amounts of data in short periods
blondinia [14]

In the case above, Mel needs a  desktop computer with a fast processor.

<h3>What is data for a computer?</h3>

Computer data is known to be a form of information processed or saved by a computer. This information is saved as text documents, images, audio clips, software programs and others.

Hence due to the volume of work and in In the case above, Mel needs a  desktop computer with a fast processor.

See options below

23

Mel is a research scientist at a health sciences center. His job requires him to analyze large amounts of data in short periods of time.

Select the best computer for Mel.



A handheld tablet computer



A desktop computer with two screens



A desktop computer with a fast processor



A portable laptop computer

Learn more about data  from

brainly.com/question/19243813

#SPJ1

4 0
2 years ago
Other questions:
  • IF YOU KNOW THE ANSWER TO THIS PLEASE ANSWER ASAP
    12·1 answer
  • 1. Zack sees an online contest. He could win $10,000 instantly! On the sign-up form, he enters his name and email address. He is
    15·1 answer
  • Please help me with this question. I don’t get it
    11·2 answers
  • EXCEL 2016:
    8·2 answers
  • If I want to add a new slide to my presentation, which option would I click on?
    5·1 answer
  • What is the output of the following C++ code?
    14·1 answer
  • Algorithm of how to calculate the area of a square.
    12·2 answers
  • Paula weeded 40% of her garden in 8 minutes. How many minutes will it take to weed all of her garden at this rate ?
    7·1 answer
  • Why did the boy run from the pillow...... wrong answers only
    15·1 answer
  • Write A Code In Python
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!