2 assignments from Programming II class (Java)