I need to make a main class called ProcessText that processesone or more files.
ID: 3617969 • Letter: I
Question
I need to make a main class called ProcessText that processesone or more files. I have an instantable class called TextStatistics thatgenerates some statistics about a file. The ProcessText class will take the names of the files ascommand line arguments, and create a TextStatistics object for thatfile(s) and printing it out. If no files are given on the command line the program souldprint out the message "ProcessText: Usage: java ProcessText file1[file2 . . .]" Hints on getting started, or the whole class will beappreciated!! thanks so much!! I need to make a main class called ProcessText that processesone or more files. I have an instantable class called TextStatistics thatgenerates some statistics about a file. The ProcessText class will take the names of the files ascommand line arguments, and create a TextStatistics object for thatfile(s) and printing it out. If no files are given on the command line the program souldprint out the message "ProcessText: Usage: java ProcessText file1[file2 . . .]" Hints on getting started, or the whole class will beappreciated!! thanks so much!!Explanation / Answer
//Here is ProcessText.java, hope this will helpyou. import java.io.*;public class ProcessText{public static void main(String[] args){long numChar = 0;long numLine=0;String line;if (args.length == 0){System.out.println("ProcessText: Usage: java ProcessText file1 [file2 . . ");}else{for(int i = 0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.