1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
iVinArrow [24]
3 years ago
5

Write a program named CountVowelsModularized that passes a string to a method that returns the number of vowels in the string.

Computers and Technology
1 answer:
KengaRu [80]3 years ago
7 0

Answer:

<em>import java.util.Scanner;</em>

<em>public class CountVowelsModularized {</em>

<em>    public static void main(String[] args) {</em>

<em>        Scanner in = new Scanner (System.in);</em>

//Prompt user to enter a string, receive it and assign to a variable<em>        </em>

<em>System.out.println("Enter a string Value");</em>

<em>        String word =in.nextLine();</em>

//Calling the method numVowels and passing the string

<em>        System.out.println("The Number of vowels are " +numVowels(word.toLowerCase()));</em>

<em>    }</em>

<em>}</em>

The method definition and complete program is given in the explanation section<em> </em>

Explanation:

<em>import java.util.Scanner;</em>

<em>public class CountVowelsModularized {</em>

<em>    public static void main(String[] args) {</em>

<em>        Scanner in = new Scanner (System.in);</em>

<em>        System.out.println("Enter a string Value");</em>

<em>        String word =in.nextLine();</em>

<em />

<em>        System.out.println("The Number of vowels are " +numVowels(word.toLowerCase()));</em>

<em>    }</em>

<em>    public static int numVowels(String string) {</em>

<em>        int counter = 0;</em>

<em>        for (int i = 0; i < string.length(); i++) {</em>

<em>            if (string.charAt(i) == 'a' || string.charAt(i) == 'e' || string.charAt(i) == 'i'</em>

<em>                    || string.charAt(i) == 'o' || string.charAt(i) == 'u') {</em>

<em>                counter++;</em>

<em>            }</em>

<em>        }</em>

<em>        return counter;</em>

<em>    }</em>

<em>}</em>

You might be interested in
What to do if you click on a phishing link on iphone
gregori [183]

Answer:

Nothing, just exit out of it

Explanation:

5 0
3 years ago
Read 2 more answers
The ___________ method returns the length of an array.
MaRussiya [10]

Answer:

A. Append

Explanation:

4 0
3 years ago
Read 2 more answers
Does anyone know what the name of the game is, where you click on the grey dots in a 3x3 grid and try to make them all the same
antoniya [11.8K]

Answer:

Its the pattern puzzle game.

Explanation:

The answer is straight forward. Its a pattern puzzle game, and here we need to change everything to same color, and that is a pattern of this pattern game. Many forms of such pattern games are available, but this one happens to be the most popular among them all, and is widely used by various people of all ages to pass their time.

3 0
3 years ago
Carlie was asked to review a software project for her company to determine specific deadlines. Which part of project management
Elis [28]

Answer:

Resources

Explanation:

Carlie certainly requires to review the resources. It is important to find out how many software engineers, testers, etc. are available. And only then Carlie can find out the exact deadlines as required here. And hence, she must have look at the resources while determining the specific deadlines. Hence, resources are the correct option.

3 0
3 years ago
Read 2 more answers
Software is:
irakobra [83]
I think the answer is A
7 0
3 years ago
Other questions:
  • List 5 different programming languages calls to print
    8·2 answers
  • Research information technology affects on job market, career pathways, occupational outlooks in business and finance and synthe
    7·1 answer
  • In linear​ programming, choices available to a decision maker are called
    12·1 answer
  • Who is hurt by piracy
    10·1 answer
  • Fill in the blanks : To store 3 character a computer occupies...................bytes memory space​
    8·2 answers
  • My father helps me more than helping my sister in Maths because I need more help to understand. This situation shows ___________
    11·1 answer
  • Which statement describes what the Conditional Formatting option in Excel 2016 allows users to do?
    15·2 answers
  • If we need to manage a contiguous range of memory, handling requests to allocate various sized chunks, and later make those chun
    12·1 answer
  • • Do you think documentaries are best delivered in media such as films or documentary?
    10·1 answer
  • What should a pie chart represent?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!