import java.util.*; public class BAGRUT { public static int big(int[] arr) //מקבל מערך של מספרים שלמים ומחזיר את האינדקס המינימלי של המספר המקסימלי { int index = 0; int biggest = arr[0]; for(int i = 0 ; i < arr.length ; i ++) { if(arr[i] > biggest) { biggest = arr[i]; index = i; } } return index; } public class Game { private String gameName; private int numPlayers; private boolean isWater; public String getGameName() { return gameName; } public void setGameName(String gameName) { this.gameName = gameName; } public int getNumPlayers() { return numPlayers; } public void setNumPlayers(int numPlayers) { this.numPlayers = numPlayers; } public boolean isWater() { return isWater; } public void setWater(boolean isWater) { this.isWater = isWater; } public Game(String gameName , int numPlayers , boolean isWater) { this.gameName = gameName; this.numPlayers = numPlayers; this.isWater = isWater; } } public class Country { private String countryName; public static int size = 43; private Game[] games; private int actualGames; public Country(String name) { this.countryName = name; this.games = new Game[size]; this.actualGames = 0; } public boolean isParticipating (String name) { for(int i = 0 ; i < 42 ; i++) if(this.games[i].getGameName().equals(name)) return true; return false; } } }