Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Java program that asks the user a sentence: word1 word2 words. WOTE Your prompts to the user must be: Enter four works: Output

image text in transcribed
Write a Java program that asks the user a sentence: word1 word2 words. WOTE Your prompts to the user must be: Enter four works: Output word1 and the length of word1 and the position of all the vowels (a, e, 1, 0, ) in wom toiu) in word1 Output word2 and the length of word2 and the position of all the vowels (a, e, i, o, u) in words Output word3 and the length of word3 and the position of all the vowels (a, e,1,0,0) in wom Output word4 and the length of word4 and the position of all the vowels (a, e, i, o, u) in Wom Sample runs would look like: -1 Enter 4 words: she smiles third frisbee Word 1 = "she" Length - 3 position of vowels al. -1. 2.1 Word 2 = "smiles" Length - 6 position of vowels 'a' .1. - 4 Word 3 = "third" Length - 5 position of vowels: a = -1, -1, Word 4 - "frisbee Length - 7 position of vowels: -1, tel. 5. 1 1 -1, - 2 -2, 2. -1, U OP -1. -1, -1 1 1 -1 U or Enter 4 words: shoe shoe chime wallabees Word 1 - "shoe Length - 4 position of vowels: 'a' - -1, "el - 3, '1' = -1, "O' = 2, 'U' --1 Word 2 - "shoe" Length - 4 position of vowels: 'a' - -1, 'e' - 3, 'i' - -1, "O' - 2, 'u' = -1 Word 3 = "chime Length = 5 position of vowels: 'a' = -1, 'e' = 4, "i' - 2, 'O' - -1, "'--1 Word 4 - "wallabees" Length - 9 position of vowels: a' 1. Tel 6, 1 -1, O -1. U = -1 Please make sure to end each line of output with a newline. Note: If there are multiple instances of the same vowel, only the index of the first occurrence should be used Please note that your class should be named Words. -minn Methods I by

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Development Of Knowledge Framework For Affective Content Analysis

Authors: Swarnangini Sinha

1st Edition

B0CQJ13WZ1, 979-8223977490

More Books

Students also viewed these Databases questions

Question

=+ 2. What is the main advantage of this approach?

Answered: 1 week ago