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
Ymorist [56]
3 years ago
5

The function below takes a single string parameter: sentence. Complete the function to return a list of strings indicating which

vowels (a, e, i, o, and u) are present in the provided sentence. The case of the vowels in the original sentence doesn't matter, but the should be lowercase when returned as part of the list. The order of the strings in the list doesn't matter. For example, if the provided sentence was 'All good people.', your code could return ['a', 'e', 'o']. It could also return ['e', 'o', 'a']. One way to implement this would be to use the filter pattern starting with the list of all vowels.
Computers and Technology
1 answer:
Katena32 [7]3 years ago
7 0

Answer:

import java.util.*;

public class num3 {

   public static void main(String[] args) {

   String sentence = "All good people";

       System.out.println("The vowels in the sentence are ");

       returnVowels(sentence);

   }

   public static void returnVowels(String word){

       String newWord = word.toLowerCase();

       String vowels ="";

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

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

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

               vowels = vowels+newWord.charAt(i);

               //System.out.print(newWord.charAt(i)+" ");

           }

       }

     

       String [] chars = vowels.split("");

       Set<String> uniqueVowels = new LinkedHashSet<>();

       for (String s : chars) {

           uniqueVowels.add(s);

       }

       System.out.println(uniqueVowels);

   }

}

Explanation:

In Java

Create the method/function to receive a string as argument

Change the string to all small letters using the toLowerMethod

Iterate through the string using if statement identify the vowels and store in a new String

Since the sentence does not contain unique vowel characters, use the set collections in java to extract the unique vowels and print out

You might be interested in
The _____ method randomly rearranges the items in the list provided in the parentheses.
yulyashka [42]
Shuffle is the answer
8 0
3 years ago
Read 2 more answers
F1: 2^14 formula ....................................................................
QveST [7]

Answer:

=POWER(2,14)

Explanation:

The complete question is to write the given formula in cell F1

We have:

F1 = 2^\wedge {14}

The above formula implies 2 raised to the power of 14.

In Excel, this can be achieved using the power function

And the syntax is:

=POWER(m,n)

which means m^n

So, 2^14 will be entered in cell F1 as:

=POWER(2,14)

4 0
3 years ago
A database program helps to ____________. A. Organize, send, and retrieve e-mails quickly b. Deliver elegant presentations to a
jarptica [38.1K]

Answer: D

Explanation: D. A database is software which is designed to store massive amounts of data and organize them in such a way that information can easily be worked on (added, deleted, moved, etc...).

7 0
3 years ago
What is a motherboard?
laila [671]

Answer:

A mother board is something that helps a electronic run im guessing

Explanation:

6 0
3 years ago
Read 2 more answers
Hello guys where's bios chip in this motherboard ​
dolphi86 [110]

Answer: This. is an old Asus Board and the chip is missing

Explanation: The BIOS chip goes into the Processor holder. the one with the curved metal arm to help release it (goes into the cage first you use glue made for ) installing the chip, then you place the processor on top of that big part where it resembles a slice of bread.  You lock down the four legs and that is the brain of the MB.

To update the BIOS,in the machine outside of the operating system. ON WIndows it is the command center on Mac it is different.

The CMOS Battery is next to the word ASUS .

The BIOS is code and software that you upload from the manufacturer's site like ASUS.  and in the command environment, you update the bios.

The CHIP is delicate and it ONLY GOES  on ONE WAY! BE Verry very careful installing the chip and processor better to have a pro (like me ) do it ...

Motherboards are very delicate and expensive! All parts go one way and one way only. Be glad you don't have to Sauter anything.

3 0
1 year ago
Other questions:
  • A company's computers monitor assembly lines and equipment using ________ communications.
    6·1 answer
  • Read the scenario below, then follow the subsequent instructions.
    15·1 answer
  • what optimizes airflow, keeps cylinder pressure in a certain range, and determines the engine's operating range?
    12·1 answer
  • How many generations of computer languages
    10·1 answer
  • Explain the term DNS(Domain Name System) and why it is used.
    9·1 answer
  • Write a program to assign distinct number between 1 and 200 into an int array of 100 elements in ascending order (you may reuse
    6·1 answer
  • Complete the statement below using the correct term.
    14·1 answer
  • They are correct? thank you!
    5·1 answer
  • Write a Python program stored in a file q1.py to play Rock-Paper-Scissors. In this game, two players count aloud to three, swing
    13·1 answer
  • What's the best definition of financial literacy?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!