Code from in-class Java assignments