public class Trio { private int part1; private int part2; private int part3; private int count; public Trio(int ida, int idb, int idc, int count) { this.part1=ida; this.part2=idb; this.part3=idc; this.count = count; } public int getPart(int i) { if (i==1) return this.part1; if (i==2) return this.part2; if (i==3) return this.part3; return -1; } public int getCount() { return this.count; } }