Java code for the TBA assessment