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...
-
As an example of difficulties that auditors experience in collecting confirmations of cash balances, consider the Parma at fraud. In that case, the company overstated cash by about $5 billion, which...
-
Creassos Ltd. was formed in July 2012 with \($20,000\) of capital. \($7,500\) of this was used to purchase equipment. The owner budgeted for the following: Wages and other expenses are paid in cash....
-
LakeMaster Company manufactures outboard motors that are sold throughout the United States and Canada. The company uses a comprehensive budgeting process and compares actual results to budgeted...
-
Question 5 of 50 < View Policies Current Attempt in Progress -/1 E ! The following information for Blossom Products is available on June 30, 2014, the end of a monthly accounting period. Prepare the...
-
Legislative Act: Section 41-1-6-9 of the state statutes defines defamation as the intentional publication of a false statement about a person. The statute defines publication as communication to a...
-
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...
-
How does the exponential smoothing forecasting method differ from the moving-average forecasting method?
-
A small food truck selling fried chicken sandwiches. Your monthly fixed cost (rent on the truck) is $555. Your friend tells you that you need to sell at least 344 units each month to break even. What...
-
Valuing Bonds [5 Points] Suppose that you are considering buying a Bond. The current interest rate is 5% per annum. This bond matures four years from now (t = 4), at which point it will pay out...
-
The related data of Giyumi company's machinery: Estimated useful life 11 years Year 1 depreciation if under straight line method P10,000 Year 1 depreciation if under double declining method P25,000...
-
Suppose domestic residents of France purchase 1.2 trillion euros of foreign assets. At the same time, assume that foreigners purchase 1.5 trillion euros of French assets. What is France's net capital...
-
It is said that many leaders have charisma. What is charisma? Name someone you feel has charisma and tell why that person has charisma. Both Presidents Obama and Trump are said to have Charisma....
-
To test H0: m = 50 versus H1: m 6 50, a simple random sample of size n = 24 is obtained from a population that is known to be normally distributed, and the sample standard deviation is found to be 6....
-
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...
-
Paste X v Calibri (Body) <11 14 BIU fx v A 10 h Wrap Text Merge & Center C D E F The following data from the just completed year are taken from the accounting records of Fatimah Company (in dollars):...
-
Eisner Company has an opportunity to manufacture and sell a new product for a five-year period. The company estimated the following costs and revenues for the new product: S Cost of new equipment...
-
Novak Pix currently uses a six-year-old molding machine to manufacture silver picture frames. The company paid $94,000 for the machine, which was state of the art at the time of purchase. Although...
Study smarter with the SolutionInn App