subject

Task write a boolean method isvowel(char ch) that returns true if the character argument is either 'a', 'e',t,'o', 'u'. otherwise, return false. system. out. println("is 'a' a vowel? " + isvowel('a') ); system. out. println("is 't' a vowel? " + isvowel('t')); system. out. println("is 'y' a vowel? " + isvowel('y') ); // is 'a' a vowel? // is 't' a vowel? // is 't' a vowel? true false false write a method boolean isvowel(char ch, boolean y). it works like the previous method when the second argument is false, so y would not be considered a vowel. when the second argument is true'y' would be considered a vowel system. out. println("is 'a' a vowel? " + isvowel('a', false) ); system. out. println("is 't' a vowel? " + isvowel('t', false) ); system. out. println("is 'y' a vowel? " + isvowel('y', false) ); system. out. println("is 'a' a vowel? " + isvowel('a', true)); system. out. println("is 't' a vowel? " + isvowel('t', true)); system. out. println("is 'y' a vowel? " + isvowel ('y', true)); // is 'a' a vowel? // is 't' a vowel? // is 'y' a vowel? // is 'a' a vowel? // is 't' a vowel? // is 'y' a vowel? true false false true false true write a method countvowels (string input) that returns the number of vowels ('a', 'e', 1, 0, 'u') in the string. system. out. println("zybby has + countvowels ("zybby") + " vowels."); // 0 write a method countvowelsincludingy(string input) that returns the number of vowels ('a', 'e',t,'0', 'u', y) in the string. system. out. println("zybby has + countvowelsincludingy ("zybby") + " vowels."); // 2 write a boolean method hasvalue(string input, char ch) that true if the character argument is in the input string. otherwise, return false. system. out. println( hasvalue ("my favorite martian was a 1960's tv program.", 's') system. out. println( hasvalue ("my favorite martian was a 1960's tv program.", '6') system. out. println( hasvalue ("my favorite martian was a 1960's tv program.", 'f') because 'f' is not same as 'f' // true // true // false the main method is provided to show tests for each method, and the template has suggested method headers. tests will be unit tests, instead of output tests.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Matlab question: use switch and anythe lottery game matches three different integer numbers between 1 and 10. winning depends on how many matching numbers are provided by a player. the player provides three different integers between 1 and 10.if there is a match of all 3 numbers, the winning $ 1000.if there is a match with 2 numbers, the winning $ 10.if there is a match of all with 1 numbers, the winning $ 1.with no match, the winning is $0.write a function lottery3 that checks three numbers provided by a player and determine the winning amount. if the user mistakenly enters same number twice/thrice and if that number matches one of the winning numbers, the code should count that number only once and display correct result. the player doesn’t have to guess the order of numbers.the input to the function lottery3 can have up to two input arguments. the first input argument is a row array numbers with 3 numbers. if the second argument input testcode is present, and is a row vector of 3 values, the function lottery3 uses the code in testcode as the three winning numbers (the test must be three different integer numbers between 1 and 10), else three different numbers will be automatically generated by testcode.the ouput should return the variable winnings and the three winning numbers in the row array winnumbers.hint: make use of the internal function any.restriction: the function must use switch-case statements to determine the winning.example #1: winning = lottery3( [1,2,1],[1,2,3])produceswinning =10example #2: [winning,winnumbers] = lottery3( [1,2,3])produceswinning =3winnumbers =8 5 3
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
Melissa needs to add a topic to an email that she will send to her teacher. choose the name of the field where she should type her topic.
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
For her science class, elaine is creating a presentation on weather in the united states. she wants to make the presentation beautiful and interesting by drawing simple cloud or wave shapes. which is the best way for elaine to draw these shapes?
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
What is the main benefit of minimizing the ribbon in word? more options will be accessible through customized keystrokes. more of the document will be viewable without needing to scroll. fewer controls will be accessible to the user by using the mouse. fewer editing options will be available without entering a password.
Answers: 1
You know the right answer?
Task write a boolean method isvowel(char ch) that returns true if the character argument is either '...
Questions
question
Mathematics, 14.01.2021 19:50
question
Mathematics, 14.01.2021 19:50
question
English, 14.01.2021 19:50
question
Mathematics, 14.01.2021 19:50
Questions on the website: 13722363