// IMPORT APPROPRIATE THINGS HERE public class FunFactDisplayer { public static void main(String[] args) throws FileNotFoundException { //prompt user and get their name... ////////////////////// // INSERT CODE HERE // ////////////////////// //prompt user for a year... ////////////////////// // INSERT CODE HERE // ////////////////////// //have user select directory where they downloaded their trivia files //note: triviaFolderPath is assigned the path (a string) to this folder // LEAVE THE CODE BELOW "AS IS": JFileChooser chooser = new JFileChooser(); chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); chooser.setDialogTitle("Select the folder containing your trivia files..."); int result = chooser.showOpenDialog(null); if (result != JFileChooser.APPROVE_OPTION) {System.exit(0);} String triviaFolderPath = chooser.getSelectedFile().getAbsolutePath(); // append "/1886.txt" // (or similar, depending on what the user wanted and if this will be run on a mac or windows machine) // to the triviaFolderPath string to get the full path to the desired trivia file. // then read the contents of the file with that full path, and store the (single) line it contains ////////////////////// // INSERT CODE HERE // ////////////////////// // report the contents of the trivia file to the user using a JOptionPane // (use the kind meant only for displaying a message/information to the user) ////////////////////// // INSERT CODE HERE // ////////////////////// // collect a fun fact for the current year from the user // note, you may have a leftover "newline" character from your previous collections of input // that your scanner must get past. uncomment the next statement to accomplish that, if needed //scanner.nextLine(); // consume the leftover "newline" character ////////////////////// // INSERT CODE HERE // ////////////////////// // store this fun fact in a file named 2026.txt in the same trivia folder ////////////////////// // INSERT CODE HERE // ////////////////////// }