Some work from chapter 2 in big java