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
Juli2301 [7.4K]
2 years ago
6

Write the definition of a method, isReverse, whose two parameters are arrays of ints of equal size. The method returns true if a

nd only if one array is the reverse of the other. ("Reverse" here means same elements but in reverse order.)
Computers and Technology
1 answer:
jok3333 [9.3K]2 years ago
5 0

Answer:

The following are code in the Java Programming Language.

//define boolean type function

boolean isReverse(int ar[], int b[])

{

//declare integer type variable

int x;

//set the for loop

for (x=0; x < ar.length && ar[x] == b[ar.length-1-x];  x++);

return x == ar.length;

}

Explanation:

<u>The following are the description of the code</u>.

In the above code that is written in the Java Programming Language, we define the boolean data type function that is 'is Reverse()' and pass two array integer data type arguments that is 'ar', 'b' in the then, declare integer data type variable that is 'x'. Set the for loop that the boolean type value is true or false.

You might be interested in
The signature of a function is determined by
oksian1 [2.3K]

Answer:

The name of the function and the parameter's types.

Explanation:

In Java, you need to have distinct functions - if two different methods have the same name, as long as they have different parameters - that is fine. If they have the same name and parameters, that is not fine.

3 0
3 years ago
Give me two reasons why return statements are used in code.
levacccp [35]
It can stop the function when it’s no longer needed to keep running

And it can give a certain value to send back so it can be used elsewhere in your code
8 0
3 years ago
Read 2 more answers
Write the header file Stadium.h for a Stadium class. The Stadium class has the following data members: 1) an array of 1000 Seat
irakobra [83]

Answer:

Check the explanation

Explanation:

File: Seat.h:

typedef struct Seat

{

  int seatNumber;

  string customerFullName;

  double seatCost;

};

File: Stadium.h

class Stadium

{

  //Data Members

  private:

      Seat seats[1000];

      string stadiumName;

      int numOccupiedSeats;

 

  public:

      Stadium(string); //Constructor

      void assignSeat(double, string);

      void unAssignedSeat(int seatNumber);

      int getNumberOfAssignedSeats();

      double getCostOfSeat(double seatNumber);

}

4 0
2 years ago
If E=mc2 then what does F equal?
Vladimir79 [104]

Answer:

First of all,there is not theory F=ma^2!!

Its F=ma and they are definitely not the same.Here F means force and E means Energy.

a means acceleration, but c means the velocity of light. Clearly there's difference between acceleration and velocity and force and energy.

F=ma can be applied on things we normally see but E=mc^2 is applied on things that can travel nearly in light speed!which means atoms,molecules, protons,electrons etc. energy can be determined by the Einstein theory but F=ma is for determining human energy, or energy of cars,vehicles or any regular moving things

Explanation:

4 0
2 years ago
In cell h15 enter a vlookup function to determine the 2018 percentage of total attendance for the city listed in cell h14. Use t
Amanda [17]

Answer:

=vlookup(h14, a5:h11,8,false)

Explanation:

Here, h15 is the cell in which we need the output and the value to be matched in rows to find the exact row is h14, and the range is expressed as a5:h11. Now to find the column number, we need to figure out the first and the concerned column. So, the concerned column is in which the total attendance is being listed and it is h(h14), and the first column is a. So, the column number is a=1 h=8, =8. And since we need the exact match, the value of the fourth argument is false. And thus, we have the above formula. Remember. vlookup formula is:

=vlookup(cell where the result is to be placed, range, column number in the same row as h14, exact match or approximate match). For exact match it's false, and for the approximate match, it's true.

8 0
3 years ago
Other questions:
  • Which of the following is a justification for giving a Page Quality (PQ) rating of Lowest? Select all that apply. True False The
    7·1 answer
  • Which of the following would be a tradeoff of a scientific advancement that enables us to catch fish from the ocean faster than
    5·1 answer
  • Which ipv6 prefix will the typical enterprise network receive from the service provider?
    12·1 answer
  • i will be doing an interview to someone so plz comment down below something random and you will automatically enter
    11·1 answer
  • The use of themes in WordPress is a good illustration of what major concept?
    6·1 answer
  • Apple's macOS and Microsoft Windows are examples of ________ software. utility application communication operating system
    13·1 answer
  • HELP AASAP BRAINLIEST JUST HELP
    13·1 answer
  • How do you create multiple columns in Word?
    12·1 answer
  • Will give brainly if answer all or my questions
    8·1 answer
  • What does ATM mean on lego mario mean I know that this is not school related but I trying to help my brother ​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!