Java Programming 1. Task: Suppose you are writing a game-playing program that in
ID: 3667550 • Letter: J
Question
Java Programming
1. Task: Suppose you are writing a game-playing program that involves 2-digit numbers, each number being composed of 2 different digits. Test if whether numbers entered in a sequence are accepted to be used in this game. Test for errors in input (including type)
SAMPLE OUTPUT:
Enter a 2-digit number. The digits should be different. Zero to stop: rt
Not an integer, try again: f
Not an integer, try again: 34.5
Not an integer, try again: -4
NOT good for your game!
Enter a 2-digit number. The digits should be different. Zero to stop: rds
Not an integer, try again: 99
NOT good for your game!
Enter a 2-digit number. The digits should be different. Zero to stop: 23
Good for your game! Play!
Enter a 2-digit number. The digits should be different. Zero to stop: 11
NOT good for your game!
Enter a 2-digit number. The digits should be different. Zero to stop: kjhgfgfd
Not an integer, try again: 8
NOT good for your game!
Enter a 2-digit number. The digits should be different. Zero to stop: 0