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
Elanso [62]
3 years ago
7

max is a method that accepts two int arguments and returns the value of the larger one. Four int variables, population1, populat

ion2, population3 and population4 have already been declared and initialized. Write an expression (not a statement !) whose value is the largest of population1, population2, population3 and population4 by calling max. Assume that max is defined in the same class that calls it.
Computers and Technology
1 answer:
Sav [38]3 years ago
3 0

Answer:

Hello, I imagine that you use Java as the programming language since you refer to classes, so I will make a small code that simulates a Java program with the descriptions you need.

public class Example {

 

 

 public int Max(int population1, int population2, int population3, int population4) {

   int max = 0;

   if(population1 > population2 && population1 > population3 && population1 && population4){

       max = population1;

   }

   else if(population2 > population1 && population2 > population3 && population2 && population4){

       max = population2;

   }

   else if(population3 > population2 && population3 > population1 && population3 && population4){

       max = population3;

   }

   else {

       max = population4;

   }

   return max;

 }

 

 public static void main(String[] populations) {

   Example myObject = new Example();

   int population1 = 1;

   int population2 = 2;

   int population3 = 3;

   int population4 = 4;

   int max = myObject.Max(population1,population2,population3,population4);

   System.out.println(max); // 4

 }

}

You might be interested in
What do you click to move to the next cell in the row?
e-lub [12.9K]
Hold down the Ctrl key (Windows)/Cmd key (Mac) andclick the row numbers that youwant to move to highlight them.Click and drag one of the rownumbers to move them all to anew location.


hope it helped
3 0
4 years ago
Sharon is responsible for the security on web applications. She’s looking to see if all applications have input validation. What
LiRa [457]

Answer:

Options Include:

<em>A) Server-side validation </em>

<em>B) Client-side validation </em>

<em>C) Validate in trust </em>

D) Client-side and server-side validation

<em>Client-side and server-side validation is Correct</em>

Explanation:

The best option is to validate the client side with the server side. Using these together would provide the best testing option for Sharon.

<em>This keeps user feedback instantly without wasting postbacks while also protecting against JavaScript disabled users. That's how the validation controls for ASP.NET operate. </em>

This is definitely not over-engineering as there are risks of using one without the other.

Individual validation on the server side and individual validation on the client side are both incorrect. Trust validation is not a form of validation.

4 0
3 years ago
A list that is not sorted by numbers is called a?
Feliz [49]

Answer:

An unordered list(HTML)

6 0
4 years ago
How many 64 x 8 memory chips are needed to provide 4096 x 16 memory capacity? Create 4096 x 16 memory with the required number o
Licemer1 [7]

Answer:

i World sat 4

Explanation:

i got th3 answer right

4 0
2 years ago
An authenticated user can add up to how many computer accounts to the domain, by default
Brums [2.3K]
By default, 10 computers can be joined to the domain by both users and administrators. As long as a user is authenticated against the Active Directory, he or she can add up to 10 computers to the domain.
While this one posses as an advantage for smaller companies, it is not a desirable feature for bigger companies since they have to control more tightly who can add machines to their domain.
7 0
4 years ago
Other questions:
  • What is an advantage of taking notes in a digital format?
    6·2 answers
  • Which microphones are considered to have the best quality?
    12·2 answers
  • The purpose of the align phase is to align your team with ______.
    9·1 answer
  • Practice with CSS. a. Write the CSS for an HTML selector footer with the following characteristics: a light-blue background colo
    11·1 answer
  • What is it with the order of operations
    9·1 answer
  • If you can name this you get 15 points: ↑↑↓↓←→←→βα
    10·1 answer
  • Examples of the many different ways an app can be used are called use
    6·2 answers
  • Areas on which the development of the computer as a communication technology is based
    5·1 answer
  • Please help.........​
    13·1 answer
  • Connection security rules are used to secure traffic between two computers while it crosses internet?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!