Java Code - Brandeis COSI-12b