Write a program that prompts the user to enter a text file name and displays the number
Question:
Write a program that prompts the user to enter a text file name and displays the number of vowels and consonants in the file. Use a set to store the vowels A, E, I, O, and U.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Answer rating: 60% (10 reviews)
import javautilScanner import javautilHashSet import javautilArrays public class Exercise2104 public static void mainString args throws Exception HashSet set1 new HashSet ArraysasList new CharacterA E ...View the full answer
Answered By
Muhammad Umair
I have done job as Embedded System Engineer for just four months but after it i have decided to open my own lab and to work on projects that i can launch my own product in market. I work on different softwares like Proteus, Mikroc to program Embedded Systems. My basic work is on Embedded Systems. I have skills in Autocad, Proteus, C++, C programming and i love to share these skills to other to enhance my knowledge too.
3.50+
1+ Reviews
10+ Question Solved
Related Book For
Introduction To Java Programming And Data Structures Comprehensive Version
ISBN: 9780136520238
12th Edition
Authors: Y. Daniel Liang
Question Posted:
Students also viewed these Computer science questions
-
Write a program that prompts the user to enter three strings. Compare the String objects lexicographically and print the middle-valued string. For example, if the three strings were "abcd", "wxyz",...
-
Write a program that prompts the user to enter a file name, then displays the frequency table of the characters in the file and the Huffman code for each character.
-
Write a program that prompts the user to enter the length from the center of a pentagon to a vertex and computes the area of the pentagon, as shown in the following figure. The formula for computing...
-
Motion of Electrons in a Magnetic Field An electron of mass m and charge -e is moving through a uniform magnetic field B = (B, 0, 0) in vacuum. (Figure 1)At the origin, it has velocity (Uz, Vy, 0),...
-
Use the standard Normal table to find the following cut-off values for Z. Also sketch a standard Normal curve, and shade the region corresponding to the given probability. a. P (Z z) = 0.15 c. P (-z...
-
A die is thrown (1, 2, 3, 4, 5, 6) and a coin is tossed (H, T). (a) Enumerate the elementary events in the sample space for the die/coin combination. (b) Are the elementary events equally likely?...
-
What is the purpose of timelines in an investigation?
-
The following balances were taken from the books of Parnevik Corp. on December 31, 2012. Assume the total effective tax rate on all items is 34%.InstructionsPrepare a multiple-step income statement;...
-
4. Let N+ denote the set of positive natural numbers {1, 2, 3, 4, . Z with d > 0. Define }. Let x, d - M {x qd qZ}. Prove that MN is non-empty. 4
-
Using the data in the student spreadsheet file P&G.xlsx (to find the student spreadsheets for Financial Analysis with Microsoft Excel, seventh edition, go to www.cengagebrain.com) forecast the June...
-
Modify Listing 20.12, EvaluateExpression.java, to add operators ^ for exponent and % for remainder. For example, 3 ^ 2 is 9 and 3 % 2 is 1. The ^ operator has the highest precedence and the %...
-
Rewrite Listing 21.9 to read the text from a text file. The text file is passed as a command-line argument. Words are delimited by whitespace characters, punctuation marks (,;.:?), quotation marks...
-
Generate a list of the largest short positions in the U.S. by the percentage of shares outstanding.
-
Echo Industries provides materials for Jason Bradley's engineering firm. Their trade discount is 21%. Rawley's Steel Supply provides similar materials with a trade discount of 20/1. How much is saved...
-
Why do some businesses choose not to export?
-
What does the S-Curve in the product life cycle tell us? a. Products fail because customers perceive some features of these products to be inferior to rival products. b. The R-Curve will always...
-
What are the different attacks against the protocol (IPv4IPv6Routing ProtocolsRemote Access)? How do they work? What are the vulnerabilities being exploited? How are these vulnerabilities being...
-
How much money must you set aside at age 20 to accumulate retirement funds of P100,000 at age 65, assuming a rate of interest of 7% If you deposit P2,000 in a five-year certificate of deposit at...
-
An object of mass 306 g is attached to the base of a spring, with spring constant 25 N/m, that is hanging from the ceiling. A pen is attached to the back of the object, so that it can write on a...
-
How can you tell from the vertex form y = a(x - h) 2 + k whether a quadratic function has no real zeros?
-
Rewrite Programming Exercise 18.10 using a helper method to pass the substring high index to the method. The helper method header is: public static int count(String str, char a, int high) Write a...
-
Write a recursive method to return the number of uppercase letters in a string. Write a test program that prompts the user to enter a string and displays the number of uppercase letters in the string.
-
Write a recursive method that returns the largest integer in an array. Write a test program that prompts the user to enter a list of eight integers and displays the largest element. Write a recursive...
-
10. Complete the table below only using hexadecimal numbers: AL CODE mov eax, 2567922 mov ebx, 2567922h mov [cax], cax mov ebx. [eax] EBX EAX [EAX]
-
- Given that et == 0 1a) In Python: - Using the Taylor series given, develop a tolerance based, recursive, vectorized program which computes the error function er f(x) where = er f(x) = e-dt. 1b) -...
Study smarter with the SolutionInn App