So...do you or your brother have any experience with java?
Also, regarding this bit:
A[P] + A[Q] > A[R],
A[Q] + A[R] > A[P],
A[R] + A[P] > A[Q].
The first rule is the only relevant one as the...