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
}
}