Menu

(Solved) : Java Write Program Asks User Enter Name File Asks User Enter Character Program Count Displ Q37247980 . . .

In Java, write a program that asks the user to enter the name ofa file, and then asks the user to enter a character. The programshould count and display the number of times that the specifiedcharacter appears in the file.

Class name: FileLetterCounter

hypergrade.com Chapter 4 -Lab Assignmant-Hyper Grade Rapl.it ss name: FileLetterounte iew required output Test Case 1 Standar

hypergrade.com Chapter 4 -Lab Assignmant-Hyper Grade Rapl.it Test Case 3 Standard Input Files in the same directory letters.t

hypergrade.com Chapter 4 -Lab Assignmant-Hyper Grade Rapl.it Please enter a character: n Letter e occurs 125 times in the f

hypergrade.com Chapter 4 -Lab Assignmant-Hyper Grade Rapl.it ss name: FileLetterounte iew required output Test Case 1 Standard Input Files in the same directory input. txt ENTER input.txt letters.txt ENTER Please enter the file name: An Please enter a character: Letter ‘i’ occurs 3 times in the file ‘input.txt’.n Test Case 2 Standard Input Files in the same directory input.txt ENTER input.txt letters.txt ENTER Please enter the file name: An Please enter a character:An Letter o’ occurs 4 times in the file input.txt’.An Test Case 3 Standard Input Files in the same directory letters.txt ENTER input.txt letters.txt hypergrade.com Chapter 4 -Lab Assignmant-Hyper Grade Rapl.it Test Case 3 Standard Input Files in the same directory letters.txtENTER input.txt . letters.txt Please enter the file name: An Please enter a character: An Letter ‘aoccurs 82 times in the file ‘letters.txt.An Test Case 4 Standard Input Files in the same directory letters.txtENTER .input.txt . letters.txt Please enter the file name: An Please enter a character: An Letter e occurs 125 times in the file ‘letters.txtAn Test Case 5 Standard Input Fles in the same directory somefile.txt ENTER input.txt ENTER .input.txt . letters.txt hypergrade.com Chapter 4 -Lab Assignmant-Hyper Grade Rapl.it Please enter a character: n Letter ‘e’ occurs 125 times in the file ‘letters. txt Test Case 5 Standard Input Files in the same directory somefile.txt ENTER input. txt ENTER input.txt . letters.txt Please enter the file name: n File ‘somefile.txt’ does not exist.n Please enter the file name again: Please enter a character: An Letter .1′ occurs 3 times in the file input.txt’. Test Case 6 Standard Input Files in the same directory input.txt ENTER oprah ENTER input.txt ● letters.txt Please enter the file name: An Please enter a character: An Please enter a single letter to count in the file: n Letter ‘o’ occurs 4 times in the file ‘input.txt’.n Show transcribed image text hypergrade.com Chapter 4 -Lab Assignmant-Hyper Grade Rapl.it ss name: FileLetterounte iew required output Test Case 1 Standard Input Files in the same directory input. txt ENTER input.txt letters.txt ENTER Please enter the file name: An Please enter a character: Letter ‘i’ occurs 3 times in the file ‘input.txt’.n Test Case 2 Standard Input Files in the same directory input.txt ENTER input.txt letters.txt ENTER Please enter the file name: An Please enter a character:An Letter o’ occurs 4 times in the file input.txt’.An Test Case 3 Standard Input Files in the same directory letters.txt ENTER input.txt letters.txt
hypergrade.com Chapter 4 -Lab Assignmant-Hyper Grade Rapl.it Test Case 3 Standard Input Files in the same directory letters.txtENTER input.txt . letters.txt Please enter the file name: An Please enter a character: An Letter ‘aoccurs 82 times in the file ‘letters.txt.An Test Case 4 Standard Input Files in the same directory letters.txtENTER .input.txt . letters.txt Please enter the file name: An Please enter a character: An Letter e occurs 125 times in the file ‘letters.txtAn Test Case 5 Standard Input Fles in the same directory somefile.txt ENTER input.txt ENTER .input.txt . letters.txt
hypergrade.com Chapter 4 -Lab Assignmant-Hyper Grade Rapl.it Please enter a character: n Letter ‘e’ occurs 125 times in the file ‘letters. txt Test Case 5 Standard Input Files in the same directory somefile.txt ENTER input. txt ENTER input.txt . letters.txt Please enter the file name: n File ‘somefile.txt’ does not exist.n Please enter the file name again: Please enter a character: An Letter .1′ occurs 3 times in the file input.txt’. Test Case 6 Standard Input Files in the same directory input.txt ENTER oprah ENTER input.txt ● letters.txt Please enter the file name: An Please enter a character: An Please enter a single letter to count in the file: n Letter ‘o’ occurs 4 times in the file ‘input.txt’.n

Expert Answer


Answer to In Java, write a program that asks the user to enter the name of a file, and then asks the user to enter a character. Th…

OR