Determine the percentage of vowels

Assignment Help JAVA Programming
Reference no: EM13695817

You need to write a code for java program:

Program:Write a program that determines the percentage of vowels in a sentence by counting the number of vowels in a sentence and dividing it by the total number of characters in that sentence.

1. Create a Java program that asks the user to input a sentence in any language, counts the number of vowels in the sentence, divides it by the total number of characters in the sentence, and displays (in the console window using System.out.println) the percentage of vowels. A vowel is a, e, i, o, and u (don't worry about y being a vowel sometimes).

2. Add another loop so that the program repeatedly asks the user for a sentence and prints the percentage of vowels in it. Make this an infinite loop, so that the program never stops asking for a sentence to process. You can do this by while(true) { ...rest of the program... }

It must compile with no errors and follow the directions - Please don't copy and paste from Google

Reference no: EM13695817

Questions Cloud

Calculate the concentration of cl : Part A. Calculate the concentration of Cl? required to just begin the precipitation of AgCl in a solution having metal-ion concentrations of 0.036M.
How many grams of solid nacn have to be added : Question- How many grams of solid NaCN have to be added to 1.4 L of water to dissolve 0.16 mol of Fe(OH)3 in the form of Fe(CN)63. (For simplicity, ignore the reaction of CN? ion with water.)
Explain diprotic weak base used as a corrosion inhibitor : Question- Piperazine, HN(C4H8)NH, is a diprotic weak base used as a corrosion inhibitor and an insecticide and has the following properties- pKb1=4.22pKb2=8.67
What are the partial pressures of no(g) and no2(g) : The Partial pressure of O2(g) at equilibrium is 0.136 atm. What are the partial pressures of NO(g) and NO2(g) and what is the total pressure in the flast at equilibrium
Determine the percentage of vowels : Create a Java program that asks the user to input a sentence in any language, counts the number of vowels in the sentence, divides it by the total number of characters in the sentence.
Write a balance formula unit and total ionic : Question- Write a balance (a) formula unit, (b) total ionic and (c) net ionic equations for the reaction of sodium acetate (NaCH3COO) with sulfuric acid
Calculate the concentration of cl : Question- In qualitative analysis, Ag+, Hg2+2 and Pb2+ are separated from other cations by the addition of HCl. 1) Calculate the concentration of Cl? Required to just begin the precipitation of AgCl in a solution having metal-ion concentrations of ..
What is the emf of this cell under standard conditions : Question- A voltaic cell is constructed that uses the following reaction and operates at 298 K. (Ered Ni+2 is -0.277) Zn(s) + Ni2+(aq) Zn2+(aq) + Ni(s) (a) What is the emf of this cell under standard conditions
Need to convert this c code to mips : You need to convert this C code to MIPS - The subsequent is a sample output (user input is 2): Enter an integer: 2 The count of the integers that are greater than 2 is: 3 You have to assure the requirements specific in the instruction.

Reviews

Write a Review

JAVA Programming Questions & Answers

  What is an abstract class and how does it differ from the

question 1 what is an abstract class and how does it differ from a regular class? question 2 why are abstract class

  Build impressive piece of software to explore data sets

Assemble the GUI interactors and implement the NameSurferEntry class - build an impressive piece of software to explore interesting data

  Sorting routine adopted in the java api for arrays.sort()?

What is the sorting routine adopted in the Java API for Arrays.sort()? How different is it from the sorting routine we discussed in class? Is it better? Explain your answers in short clear sentences.

  Java program to compare two variables if they are equal

Write down program which will ask user to initialize two character arrays, program must compare two variables if they are equal.

  Explain how cookies are used to implement sessions

Describe a set of four methods that a queue would need to implement using a circular array and show the Java code to implement them if using an implementation given the outline definition below. Do not use any methods of the Collection classes.

  Create a 2-by-3 two-dimensional array of integers

Create a 2-by-3 two-dimensional array of integers and fill it with data. Loop through the array and locate the smallest value stored.

  Savingsaccount and bankaccount objects

The only differences between SavingsAccount and BankAccount objects is that SavingsAccount have an interest rate and can compute interest when necessary. Add an instance variable and a method to SavingsAccount to allow for these items.

  Write a method that prompts the user for a word and prints

Write a method that prompts the user for a word and prints out its equivalent in Pig Latin. To translate a word to Pig Latin, take the initial letter, move it to the end of the word and add 'ay'. The new suffix (first letter with ay) should be pri..

  Write a java program to simulate a calculator

Write a JAVA program to simulate a calculator. Your program should take two numbers and an operator (+,-,*,or/), from the user in the following format: number1 operator number2 (For example 5.6 + 7.2) and print the result.

  Build distributed applications using technologies

Build distributed applications using technologies like Unix and Java sockets, SUN RPC, Java RMI, and message-passing tools such as PVM and MPI and

  Build a very straightforward and fully functional machine

Build a very straightforward and fully functional machine learning classifier with the K-Nearest Neighbor (KNN) algorithm. The KNN model will read a set of data specified by the user, decide the appropriate class of the new instance, and finally o..

  Cse-241 advance programming conceptspoint of sale

cse-241 advance programming conceptspoint of sale terminalin this assignment you will be tested on the concepts related

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd