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
krok68 [10]
3 years ago
6

Write a function called which_vowels_present that takes a single string parameter. Complete the function to return a list of str

ings indicating which vowels (a, e, i, o, and u) are present in the provided string. The case of the vowels in the original string doesn't matter, but they should be lowercase when returned as part of the list. The order of the vowels in the list doesn't matter.
Computers and Technology
1 answer:
romanna [79]3 years ago
5 0

Answer:

import java.util.ArrayList;

import java.util.List;

public class Vowels {

   public static void main(String[] args) {

   String word = "I am David from Nigeria";

       System.out.println(which_vowels_present(word));

   }

   public static List which_vowels_present(String enteredWord){

       List<Character>list = new ArrayList<>();

       String word = enteredWord.toLowerCase();

       for (int i =0; i<word.length(); i++){

           if (word.charAt(i) == 'a' || word.charAt(i) == 'e' || word.charAt(i) == 'i'

                   || word.charAt(i) == 'o' || word.charAt(i) == 'u') {

               list.add(word.charAt(i));

           }

       }

       return list;

   }

}

Explanation:

  • Using Java programming Language
  • Import java.util.ArrayList; and java.util.List
  • Create the method which_vowels_present which accepts a string parameter
  • Within the method create a list object
  • Use a for loop to iterate the string. within the for loop use an if statement to check individual characters of the string if any is a vowel, add it to the list
  • return the list
  • In the main method, create a test string, call the method and pass the string as parameter

You might be interested in
A signal travels from point A to point B. At point A, the signal power is 100 W. At point B, the power is 90 W. What is the atte
11Alexandr11 [23.1K]

Answer:

Attenuation = 0.458\ db

Explanation:

Given

Power at point A = 100W

Power at point B = 90W

Required

Determine the attenuation in decibels

Attenuation is calculated using the following formula

Attenuation = 10Log_{10}\frac{P_s}{P_d}

Where P_s = Power\ Input and P_d  = Power\ output

P_s = 100W

P_d = 90W

Substitute these values in the given formula

Attenuation = 10Log_{10}\frac{P_s}{P_d}

Attenuation = 10Log_{10}\frac{100}{90}

Attenuation = 10 * 0.04575749056

Attenuation = 0.4575749056

Attenuation = 0.458\ db <em>(Approximated)</em>

7 0
4 years ago
Where is the fill handle located
Ronch [10]
The fill handle will appear as a small square in the bottom-right corner of the selected cell(s). Click, hold, and drag the fill handle until all of the cells you want to fill are selected. Release the mouse to fill the selected cells
4 0
3 years ago
You can increase your efficiency by using your e-mail program's spell checker because it eliminates the need for you to proofrea
galina1969 [7]
The answer is True bc it saves you time and is efficient
6 0
3 years ago
PLEASE ANSWER FAST!!!! look at the image below
Lubov Fominskaja [6]

Answer:

mbnlkgjhituyhklcjvjhklhur

Explanation:

hjiuyotgjfhkjmrti

7 0
3 years ago
Read 2 more answers
Please help I have errors codes and don’t know that they are.<br> Please help thank You.
gizmo_the_mogwai [7]
Refresh, power off and repeat
4 0
3 years ago
Read 2 more answers
Other questions:
  • List and define the types of System Software. How does System Software differ from Applications Software?
    12·1 answer
  • What element of a timeline helps to mark progress of the project?
    15·1 answer
  • Which statement accurately compares the restart at 1 and continue numbering featured of word
    15·2 answers
  • George wants to edit the font of the title text in his presentation. Where can he find the option to edit it?
    6·2 answers
  • Some data files should be totally hidden from view, while others should have ____ so users can view, but not change, the data.
    11·1 answer
  • To save a file so that it can be opened on most computers, select the ____ option.
    10·2 answers
  • What icon is usually used to indicate an attachment feature?
    14·2 answers
  • What does the -pwd switch do? how can you make dsadd bring up a prompt asking for the users password?
    10·1 answer
  • WHAT ACTIONS CAUSE SPAM ON LINKEDIN?
    5·1 answer
  • How do I add a Child to my Brainly account
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!