RINE 16% 10:26 PM https://canvas.sbcc.edu/2: e purpose of this assighment is to
ID: 3714074 • Letter: R
Question
RINE 16% 10:26 PM https://canvas.sbcc.edu/2: e purpose of this assighment is to learn how to worK with a data file and iteration. You get more practice on how to write all of your own code and Javadoc comments Problem Description You are going to write a program that gathers statistics ona text file in a way that is similar to word processors which tell you how many characters, words, and lines you have written. Main DocStats + DocStats(documentName String) +getNumberOfCharacters0: int +getNumberOfWords0: int +getNumberOfLines0 int This is the public interface for this object. You might need to add some private variables The UML above contains all of the public interfaces needed to implement the problem. You might need some private variables to fully implement the DocStats object. Your Main.java should contain code to test your DocStats object. Hints: . You can use two independent scanners inside of one method Getting Started We are going to do this exercise by writing the object that solves the problem first (in a source file called DocStats.java) and then testing it using code we write into Main.java. Using the techniques shown on the web page titled Project in this Class create a source file called DocStats.java as well as a file called Main.java. There is no code to copy for the assignment. You get to do itExplanation / Answer
Hi Dear,
Please find my code.
##########
Output:
Output:
Enter the input file name
D:\text.txt
-------------------------------
Number of lines : 3
Number of Words : 10
Number of characters : 46
text.txt
Hi, Good morning. Welcome to java world
Java
Java program
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.