Your task is to read an input file containing a name on each line, and then write an output file with those names, with the first letter of each name in uppercase. For example, if the input file contains the name "bugs bunny" on one line, the output file should contain "Bugs Bunny" on one line.

Complete the following file:

UpcaseNames.java

/** Reads a file of lower case names, and writes a file of the names with the first letter of each name in uppercase. */ import java.io.FileReader; import java.io.FileNotFoundException; import java.util.Scanner; import java.io.PrintWriter; public class UpcaseNames { public static void main(String[] args) throws FileNotFoundException { String inputFileName = "names.txt"; String outputFileName = "upcaseNames.txt"; // TODO: Open the input and output files. // Read records from the input file. // Upcase the first letter of each name on each line. // Write each line with the modified names to the output file. } }