Homework 6-1 Textbook Section 12.4 In a class named… Homework 6-1 Textbook Section 12.4 In a class named ReadAndPrintFile.java, use the fo

Homework 6-1 Textbook Section 12.4 In a class named… Homework 6-1 Textbook Section 12.4 In a class named ReadAndPrintFile.java, use the following prompt to get the fileName of the input file from the User:  “What is the name of your file?” If the File doesn’t exist, do not crash, but instead display “File Not Found ” + fileNameand repeatedly prompt until the user has entered a valid file name. If the File exists, read from the File and display its content on standard output (System.out)  Homework 6-2 Textbook Section 12.5 In a class named ReadAndEditFile.java, use the following prompt to get the fileName of the input file from the User:  “What is the name of your file?” If the File doesn’t exist, do not crash, but instead display “File Not Found ” + fileNameand repeatedly prompt until the user has entered a valid file name. If the File exists, read from the File. Capitalize the first letter in the file and capitalize the 1st letter after every period and correct the spacing by removing any duplicate spaces so that there is only 1 space between words. Write the modified output to a file named HomeworkOutput6-2.txt  Homework 6-3 Textbook Section 12.6 In a class named InputTextToOutputFile.java use the following prompt to get the fileName of the output file from the user: “What is the name of your output file?” Once the output file is opened, write everything the user types until the input contains “STOP!”Note: Include the line containing “STOP!” as the last thing written to the file. Computer Science Engineering & Technology Java Programming CMP 168 Share QuestionEmailCopy link