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: 66% (12 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 company had stock outstanding as follows during each of its first 3 years of operations: 4 , 0 0 0 shares of 9 % , $ 1 0 0 par, cumulative preferred stock and 5 5 , 0 0 0 shares of $ 1 0 par common...
-
6. Sun Corporation regularly sells inventory items to its parent, Pam Corporation. In preparing the consolidated income statement, which of the following items would not be affected by the direction...
-
Refer to Exercise 5-4 and prepare the appropriate journal entries for Baker Co. to record the May 5 purchase and each of the three separate transactions a through c. Baker is a retailer that uses a...
-
Recording Entries for TS-Effective Interest Method Adjust FVA at Sale and Year-End On July 1, 2020, West Company purchased for cash, four $10,000 bonds of North Corporation at a market rate of 4%....
-
Sixty-nine percent of U.S. college graduates expect to stay at their first employer for three or more years. You randomly select 18 U.S. college graduates and ask them whether they expect to stay at...
-
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...
-
This problem focuses on the determination of sample sizes. Required: a. Given the constraints of a 7 percent desired upper precision limit, and an estimated population occurrence rate of from 1 to 4...
-
An important first step of exploratory data analysis is always to visualize the data. Construct a scatterplot of each time series (i.e., two different plots). If you need pointers on how to make a...
-
Cleanie Wombat Cleanie Wombat is a small Australian company that makes cleaning products. The chemical formulas used for its products were developed through R&D conducted by the company's small R&D...
-
As a manager at Yummy Melts, Martin is responsible for the firm's Just Right brand of ice cream. He recently approved a proposal to test market new ice cream flavors. He is also considering the...
-
Cogenesis Corporation is replacing their current steam plant with a 6-megawatt cogeneration plant that will produce both steam and electric power for their operations. What is the impact of a 5% and...
-
Suppose ABC firm is considering an investment that would extend the life of one of its facilities for 5 years. The project would require upfront costs of $9.97M plus $28.94M investment in equipment....
-
Describe the circumstances when variable and absorption costing systems will report identical profits.
-
In Problem use absolute value on a graphing calculator to find the area between the curve and the x axis over the given interval. Find answers to two decimal places. y = x 3 ln x; 0.1 x 3.1
-
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...
-
All else constant, if the yield to maturity of a bond increases, the the value of the bond __________. a. increases b. decreases c. remains the same d. not enough information To answer enter a, b, c,...
-
Martha s Vineyard Marine Supply is a wholesaler for a large variety of boating and fishing equipment. The company s controller, Mathew Knight, has recently completed a cost study of the firm s...
-
1. Compute the productivity profiles for each year. If required, round your answers to two decimal places. 2a. Did productivity improve? 2b. Explain why or why not
Study smarter with the SolutionInn App