– If the "l" key (lowercase ”L”) is pressed, then the PoolTable should be cleared of all Balls (but Pockets and the PowerBar should remain). Then, a file should be chosen using a FileDialog; this file specifies the number and position of new Balls to be placed into the (now empty) Pool Table. The format of this file is as follows: ∗ if the next (space delimited) character in the file is ’#’, then the rest of the current line should be ignored. ∗ if the next (space delimited) character in the file is ’B’, then the next three items in the file will be integers. The first represents a ball number, while the second and third represent the x and y locations of the ball.
You may assume that all ball numbers will be between 0 and 15 (inclusively) and that no ball number will show up more than once. There is no guarantee that there will be any specific number of balls in the input file, though. – If the "s" key (lowercase ”S”) is pressed, then the current number and (integer) locations of each pool ball should be saved to a file, as chosen through a FileDialog. The format should match that of the "l" option above, to the extent that a file saved using this option should be able to be loaded using the "l" option. – If the "r" key (lowercase ”R”) is pressed, then all Balls currently on the table should be removed. You should then add all the Balls (15 playing Balls and the cue Ball) exactly as you should do in the constructor for a PoolTable.
