public class Rooster { private int[][] rooster; public Rooster(int[][] input) { super(); rooster = input; } public int get(int x, int y) { if (x >= rooster.length || x < 0) { throw new IllegalArgumentException("x out of bounds"); } if (y >= rooster[0].length || y < 0) { throw new IllegalArgumentException("y out of bounds"); } return rooster[x][y]; } public int gethoogte(){ return rooster.length; } public int getbreedte(){ return rooster[0].length; } }