Question
Stuck on Java problem You are going to write a program that gathers statistics on a text file in a way that is similar to
Stuck on Java problem
You are going to write a program that gathers statistics on a text file in a way that is similar to word processors which tell you how many characters, words, and lines you have written.
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 Program.java should contain code to test yourDocStats 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 Program.java. Using the techniques shown on the web page titled "How to Start Every Project in this Class" create a source file called DocStats.java as well as a file called Program.java.
There is no code to copy for the assignment. You get to do it all! Don't forget to provide proper Javadoc documentation.
variables Doc Stats Program meinergs Stringl)z void + + getNumberOfCharacters: int + getNumberOfLines): int + getNumberOfWords): intStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started