Final answer:
To generate a random integer in the range of -20 to 20, use the expression randGen.nextInt(41) - 20. For non-repeating numbers for the states, use randInt(1, 51), regenerating any duplicates, and randInt(0, 30, 3) for three non-repeating random numbers between 0 and 30.
Step-by-step explanation:
To generate a random integer in the range of -20 to 20 using the randGen.nextInt() function, you would need to adjust the function to account for both the negative and positive range of values. This is because randGen.nextInt(41) will generate a number from 0 to 40. To shift this range to -20 to 20, you just subtract 20 from the result. Therefore, the correct expression would be randGen.nextInt(41) - 20.
As for generating non-repeating random numbers representing different states, the correct command in the TI-84+ calculator would be randInt(1, 51) if we are including Washington DC, making it a total of 51 possible outcomes. If a number is repeated, you simply regenerate that particular number using the same command until a non-repeated number is produced.
For generating three random numbers between 0 and 30 without repeats, randInt(0, 30, 3) would be used, and if repeats occur, you would regenerate the duplicated numbers.