Question: we will implement the unix program wc in java. The program wc counts the number of words, lines, and characters in a file. The unix

we will implement the unix program wc in java. The program wc counts the number of words, lines, and characters in a file. The unix wc command can take input from a file or from standard input, for this exercise, our version will not accept standard input. If the user does give a file parameter, the program will print out instructions for use.

wc will print instructions for how to use wc wc -l  will print the line count of a file wc -c  will print the character count wc -w  will print the word count wc  will print all of the above

Note that can be a single file, or a file specification such as *.c. If multiple files are specified you must print the statistics for all of the specified files. If there is any doubt about the behavior, refer to how the command functions on any modern linux system. In other words, unless otherwise specified, the behavior of your code must match as closely as possible to the linux variant.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!