My implementation in java for the first CS124 mini assignment.