Some simple programming exercises taken from the Head First Java book