subject

Write a java method called vowelcount that accepts a string as a parameter and produces/returns an array of integers representing the count of each vowel in the string. the array returned by your method should hold five elements: the first is the count of the 'a's, the second is the count of 'e's, the third 'i''s, the fourth 'o's and the fifth the number of 'u's. your count should check for both upper and lower case versions. for example the call vowelcount("i think therefore i am") should return the array [1,3,3,1,0].your main program should then allow the user to type in single lines, analyzing each line and print out its count. the program should stop when the user types the word "stop" by itself.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:50
Drag each label to the correct location on the image list the do’s and don’ts of safeguarding your password. a. keep yourself logged in when you leave your computer.b. don’t write your password down and leave it where others can find it.c. share your password with your friends.d.each time you visit a website,retain the cookies on your computer.e. use a long password with mixed characters.1. do's 2. don'ts
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
To check whether your writing is clear , you can
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
File account.java (see previous exercise) contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and account number, and return a string representation. note that the constructor for this class creates a random account number. save this class to your directory and study it to see how it works. then write the following additional code: 1. suppose the bank wants to keep track of how many accounts exist. a. declare a private static integer variable numaccounts to hold this value. like all instance and static variables, it will be initialized (to 0, since it’s an int) automatically. b. add code to the constructor to increment this variable every time an account is created. c. add a static method getnumaccounts that returns the total number of accounts. think about why this method should be static - its information is not related to any particular account. d. file testaccounts1.java contains a simple program that creates the specified number of bank accounts then uses the getnumaccounts method to find how many accounts were created. save it to your directory, then use it to test your modified account class.
Answers: 3
You know the right answer?
Write a java method called vowelcount that accepts a string as a parameter and produces/returns an a...
Questions
question
Chemistry, 05.05.2020 07:28
question
English, 05.05.2020 07:28
Questions on the website: 13722367