Exercise I did to help me learn basic Java programming