You are on page 1of 1

public class Person { private int[] preferences; // Decreasing preferences private int identification; // ID person by an int public Person(int[]

pref, int id) { preferences = pref; identification = id; } public int getId() { return identification; } public int[] getAllPref() { return preferences; } public int getPref(int j) { if (j < 0 || j >= preferences.length) { return -1; } else { return preferences[j]; } } }

You might also like