text file. (e.g., message2.txt, notes.txt, message3.txt) try to the files. Develop a small menu like the example below to give the or quit. re is an example output including the extending your learning com C:\Java\bin>javac Zilla.java C:\Java\bin>java Zilla Main Menu 1. Read a file 2. Quit

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%
Allow the user to input the name of the file he or she would like to read, submit more than one
text file. (e.g., message2.txt, notes.txt, message3.txt) try to create differences between
the files. Develop a small menu like the example below to give the user the choice to read file
or quit.
Here is an example output including the extending your learning component.
C:\Java\bin>javac Zilla.java
C:\Java\bin>java Zilla
Main Menu
1. Read a file
2. Quit
What is your choice?
1
Which file do you want to read?
message1.txt
nessage1.txt
In line 1 there are 15 vowels.
In line 2 there are 16 vowels.
In line 3 there are 15 vowels.
In line 4 there are 18 vowels.
In line 5 there are 2 vowels.
In line 6 there are 17 vowels.
In line 7 there are 17 vowels.
In line 8 there are 17 vowels.
In line 9 there are 19 vowels.
In line 18 there are 19 vowels.
The total number of words in the txt file is 86.
The average number of words per line is 8.
Main Menu
1. Read a file
2. Quit
What is your choice?
58
Transcribed Image Text:Allow the user to input the name of the file he or she would like to read, submit more than one text file. (e.g., message2.txt, notes.txt, message3.txt) try to create differences between the files. Develop a small menu like the example below to give the user the choice to read file or quit. Here is an example output including the extending your learning component. C:\Java\bin>javac Zilla.java C:\Java\bin>java Zilla Main Menu 1. Read a file 2. Quit What is your choice? 1 Which file do you want to read? message1.txt nessage1.txt In line 1 there are 15 vowels. In line 2 there are 16 vowels. In line 3 there are 15 vowels. In line 4 there are 18 vowels. In line 5 there are 2 vowels. In line 6 there are 17 vowels. In line 7 there are 17 vowels. In line 8 there are 17 vowels. In line 9 there are 19 vowels. In line 18 there are 19 vowels. The total number of words in the txt file is 86. The average number of words per line is 8. Main Menu 1. Read a file 2. Quit What is your choice? 58
Write a program that will read a file called message.txt, that contains ten lines of text. The
program should determine the total number of words in the text (place in a method), the number of
vowels in each line (place in a method), and the average number of words per line, which is to be
done in main (). As mentioned, you will need a method to determine "total number of words in the
text", called words (),and another method to determine "the number of vowels in each line",
called vowels (). The average number of words per line is to be calculated in main().
Therefore, you will need 3 methods in total, main() and two more, see hierarchy chart below.
Steps in solving this problem:
1. Create message.txt in a text editor such as notepad or notepad ++.
2. Write ten lines of text making sure to press "Enter" at the end of each line, indicating a new line
to your program.
3. Using the problem-solving process, and include an IPO chart and pseudo code for your program.
4. Design a solution - write java for each of the 3 methods. Properly indent and internally
document the program (include comments). Make sure your output is user-friendly as in the
example output below.
5. Submit your message.txt, your program.
Hierarchy Chart of Methods - top level main() is the boss (management), lower
levels vowels () and words () are subordinates (the workers) and are on the same level as each
other.
vowels ()
main()
words ()
Transcribed Image Text:Write a program that will read a file called message.txt, that contains ten lines of text. The program should determine the total number of words in the text (place in a method), the number of vowels in each line (place in a method), and the average number of words per line, which is to be done in main (). As mentioned, you will need a method to determine "total number of words in the text", called words (),and another method to determine "the number of vowels in each line", called vowels (). The average number of words per line is to be calculated in main(). Therefore, you will need 3 methods in total, main() and two more, see hierarchy chart below. Steps in solving this problem: 1. Create message.txt in a text editor such as notepad or notepad ++. 2. Write ten lines of text making sure to press "Enter" at the end of each line, indicating a new line to your program. 3. Using the problem-solving process, and include an IPO chart and pseudo code for your program. 4. Design a solution - write java for each of the 3 methods. Properly indent and internally document the program (include comments). Make sure your output is user-friendly as in the example output below. 5. Submit your message.txt, your program. Hierarchy Chart of Methods - top level main() is the boss (management), lower levels vowels () and words () are subordinates (the workers) and are on the same level as each other. vowels () main() words ()
Expert Solution
steps

Step by step

Solved in 3 steps with 5 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY