Source code for java component of final project